Iran let's it's enemies kill its officials, kill its soldiers, and bomb military sites. The embassy in Syria was even bombed, an absolutely unprecedented violation of diplomatic norms that finally got Iran to bomb some runways and hangers in response. DPRK uses all available resources to defend itself; it has ICBMs, HGVs, SLBMs, and most importantly the nuclear weapons to put on them. When was the last time someone openly bombed DPRK, it's soldiers, or a DPRK diplomatic mission? If Iran has the capability to build all that and chooses not to, whether they have the capability to build it or not doesn't matter.
Maybe true for Russia but they were willing to sign a mutual defense pact with DPRK. And for the latter, Iran refused to cultivate a relationship when the opportunity was there and China went to the Arabs instead. Why did IRIAF turn down J-10A when it was offered? Why did reformists go out of their way to disrespect Chairman Xi when he visited Iran? We can blame Russia for throwing Iran under the bus for better relations with the west but the truth is Iran would do the same if it could, we can't blame China for seeing that while Iran refuses to learn from Russia's many betrayals.
Ironically, one of those alternative sources for tech you mention would have been "Israel" in an alternative history; they have long supplied third world dictatorships with modern tech.
Not an IRIAF exclusive problem. Look at projects like Aghareb or the M47 upgrade that put a parking lot security camera as a "commander sight." How many different M60 upgrades have there been and how many saw mass adoption?
Most Iranian defense projects never enter service. And for those that do, compare the quality to what DPRK is putting in service: Amnok class vs. Mowj class, Sinpo vs. Fateh class, Zulfiqar vs. M-2020, Saetbyol-9 and 4 vs. Mohajer-6 and Shahed-129. Iran imports foreign equipment over domestic options if it can, it imported AK-103, Orsis T-5000, and Russian MRAPs for border guards over Iranian equivalents.
DPRK is self-reliant, that is the entire ideology behind Juche. Both are economically and diplomatically isolated nations, all being part of the world has done for Iran is allowed one of the highest rates of brain drain in the world.