No, actually it does not.
The bombs saved hundreds of thousands of Allied lives, at the very least. They also saved millions of Japanese lives, as an amphibious invasion of Japan would have cost an unimaginable bllodbath. The Japanese people were being brainwashed to resist at all costs.
Ever hear of Saipan??
Mass Suicides on Marpi Point, Saipan - WW2 in HD and Color - YouTube
Now extrapolate that to a nation.
The people of Japan and Germany were part of the war machine...........they worked the factories that built the weapons, they supported the war both politically, and physically. That may not have been a good reason to destroy them wholesale, but it was a reason.
The people of Gaza are simply pawns. They do nothing to produce the weapons, they have nothing to do with it.
As well, there is no twisted equation........if we nuke this, we save nothing.....we just kill a lot of people.
I know you were tongue-in-cheek, but the analogy does not work on ANY level.