Gorbachev and numerous communist regimes collapsed while trying to reform and loosen up too much. The counter example of regimes that did survive are actually regimes who tightened up, massively. I am talking about China after Tiananmen and North Korea.
North Korea is an example of a country that under extreme sanction pressure and regime change pressure that still survived because went extreme with crackdowns and idelogical tightening. It made the country extremely insulated and tight when it comes to ideology. They clamped down so hard that despite people literally dying due to famine, there were no longer protests.
My impression of China after Tiananmen is also different from yours. Tiananmen was a clear color revolution attempt that wanted to topple the communist government and bring pro-western worshipping forces into power. Chinese government clearly defined those protesting and especially attacking the security forces as rioters. People were executed after June 4th. Many people were put to trial and executed. Some so called student leaders were put into bars and never allowed to get out again.
There was also a clear and permanent ideological tightening. China in the 80s was much looser in terms of what was allowed to discuss among the public compared to today. There were also thinking about doing reforms towards more democracy. But after Tiananmen there was a complete shutdown of all political reforms and that was never loosened ever again. All the so called liberals inside the party were either jailed, put into house arrest, or sidelined out of powerful positions. They were literally wiped out. There also economic tightening for a few years which only changed after Deng's 92 southern tour.
Overall, Totalitarian regimes can survive public unpopularity with extreme ideological rigidity and repression. I think Iran's regime has been too soft and loose so far and only got looser when faced with protest. The whole democracy game with allowing reformers to be elected was a clear failure. They can now only survive by going the opposite direction. Extreme repression and total ideological clampdown. They need to reorient their whole country towards patriotism and shia islamism. Essentially become the Iranian Taliban. Only with this level of crackdown they can survive the extreme economic sanctions from the west.
Will it make the country poorer? Sure, Will many of the so called liberals flee the country? They will try. Overall it will be bad for Iran as a country, but the only way Iran the Islamic Republic can survive.