I think that most of the Iran's problem has nothing to do with religion or sex but power. Obtaining power and keeping power is very difficult. Keeping people frightened by using what ever method necessary is one of the most effective methods of control. If females are taken out of the power equation then the people in control are only responsible for keeping 1/2 of the population in line. If 1/2 of the population is automatically deemed superior to the other 1/2 then every one has someone to push around, except for the women of course. If everyone's attention is directed in and among themselves then the powers at be can do what ever they want to without worry.
Sounds similar to other Abrahamic religions for most of their history.
Power is always the issue, but they are using religion as the tool to maintain it. Without that tool, it would be a lot harder to maintain that level of control.