Iran's major weakness since the prevalence of the internet and smart phones, or maybe I should rather say that the US major strength, is intel and espionage.
When Trump says that he can listen to whatever our leaders say, I actually believe him. It is entirely possible, not necessarily true, but definitely possible, that the US is capable of listening to our confidential sessions.
This war, and honestly the last two decades, have been nothing but complete and total failures for Iran's intelligence apparatus. We've been outclasses from the first moment until now at every turn.
One of the major obstacles for going nuclear at this point, besides fissile material, is our lack of ability to protect our national secrets. Even if by some miracle we acquire fissile material, as long as we cannot keep our nuclear secrets confidential, it's all in vain.
I'm going to give the late Khamenei the benefit of the doubt and assume that he issued that fatwa because he knew the US intelligence services would find out if we tried to build a nuke.