But I think God would be merciful and answer to our prayers by sparing those who are righteous.
There's a certain amount of evil you have to accept to survive in an evil place. How many Jews are in Iran anyways? The intelligentsia is small in Iran, and many of them are normal, but the vast majority of Iranians outside from some of the Armenian xtian population are willing to go along with whatever evil the government does. As such, even if the supposedly righteous people suffer as well, and I also know some who fought heroically against the nazi government there, it's worth it that the rest of the world would survive.
Cutting off an arm, you don't rejoice really that your life was saved, because you lost an arm. Even if you had to burn down a good tree, you're happy after you destroy a dozen hornets' nests, because even though they may be cost, you saved yourself and neighbors, and you improved the world.