There is some debate whether those Bible stories are litteral events or not. Many believe they were. Let's just go on that assumption.

How did the Sodom and Gomorrah story go? I mean, prior to the zapping part. Was there not someone pleading the case for the people? If you find 1000 righteous people will you spare the city? 100? 10? 1? And did not God agree to spare the city if there were indeed righteous people living there?

How about the flood? Did Noah preach for a hundred years or however long it took him to build the boat? Did he not take all kinds of criticism for doing what he did, but he tried anyway to reach the people?
As far as the children, if there were no righteous adults, then the children had no hope of learning. So there was no chance that they would mend their ways because there was noone to teach them. So in consequence, the children weren't exactly innocent. However, they were definitely more innocent than the adults, so my guess is that their spirits or souls were protected. They enjoyed a much happier afterlife than the adults did, and a much happier afterlife than they would have enjoyed if they had gone on to become just like the generation before them, so you could say they actually were spared.

Furthermore, those were old testament stories, and according to Christianity, a lot of things changed after Christ. No more need for sacrifices and wild exhibitions of God's wrath, that's the whole point of what Christ came for.