Actually you can thank Allen Dulles and the CIA. Iran had an elected leader. He made the mistake of deciding the British should not own and control all the oil in the country. The Brits started running around screaming he was probably a communist, so the CIA overthrew him on behalf of British Petroleum.
So we installed the Shah who created Savak and shocked the nuts off every opposition man etc, and 25 years later he was overthrown in the Iranian revolution.
So really, the problem of Iran was created by the CIA, in 1953, on behalf of the Brits.
I agree with much of what you said, but what you didn’t say is equally important.
Whether the shah was installed or not the Islamist’s were not going to remain quiet. Even Afghanistan was fairly western and secular for a period of time, that didn’t set well with Islamist, and they changed that.
Lebanon was western and prosperous and that didn’t set well with islamists
Law of unintended consequences always rules