Ironically, the war turned out to be neither necessary nor a xenocide.
First, it was only attempted xenocide.
Second, it was not necessary.
In addition, there's one more moral point to consider here. (Let me blow your mind...)
The queens were all safe on the Formic homeworld; for seventy-five years they had lost fleet after fleet from colony after colony, but none of the queens had yet been killed, except the one who had tried to colonize Earth. They had good estimates on the arrival date of Earth's fleet. They already knew humans were individually sentient, each one a tool-using survivor. They could have run.
You can't even argue that they were physically or psychologically incapable of fleeing from their bunker. They were psychologically capable of hiding a queen's egg on a colony. The fertile queen who attacked Earth the second time was right there in the fleet, directing her own mindless spawn, her own meat-puppets. The queens knew humans such as Mazer Rackham were willing to kill queens on purpose, and they had good reason to assume that the humans would blow them all up. They already knew a rampaging fleet of self-defense was taking out their space fleets using a cascading molecular disintegration weapon. They even knew that Ender was the best game-player Earth had yet produced, and had a good chance of getting through their defense, and taking out their planet.
The only conclusion I can consider valid is that the Formic queens, as a group of highly intelligent and morally aware sentients, chose to remain on their world and die as penance for the xenocide they unknowingly committed in the Bugger Wars. It was voluntary self-xenocide by proxy; they walked in front of that speeding bus.
At worst, Ender committed involuntary genocide, mass manslaughter of the queens, under false intelligence from his senior officers and the enemy, while serving in the military. In addition, the queens allowed it to happen as a form of penance. The military made him the axe, and the queens knelt willingly at the chopping block.
So yeah, he's earned the right to whine. Both sides used a gifted child to kill, and left him to figure out what he had done.