You need a reasonably capable semiconductor industry or partnership with somebody that has one.
I do think Iran has both of those, but I'm not an expert. Anyway, they had a major setback once because they were relying on electronics trafficked from Germany.
That's not how stuxnet works. I'm not a tanky by any means. I'm an American and we had to hire a swedish operative to infiltrate their closed Gap systems and insert a rubber ducky. The problem wasn't that the machinery came from Germany. The problem was we paid off a swedish guy to rape the software.