You are comparing insurgencies fought on the ground vs a formal conventional war utilising primarily missile stockpiles? Sorry but this seems like absolutely poor logic.
The Afghans, Vietnamese, Iraqis were successful because they had more than enough men willing to sacrifice their lives to drain the energy out of occupying western armies, however this dynamic does not apply to a war of attrition based on missile exchanges, the west can outproduce them, and outgun them. It will not be an insurgency reliant on men willing to die.
The Iranians have a roughly ~2000 missile stockpile, with capacity to produce ~50 a month. This won't last. And they're already being rendered useless by constant bombardment at the storage sites.