Like I said, if you want to criticize God’s actions, you first have to acknowledge His nature, that nothing God does could ever be evil. You aren’t doing this.
In the same way, you could never say that Satan had done something good, because in acknowledging his existence, you would acknowledge that his nature prohibits any good.
There are plenty of passages you could cite where God does things that, if done by a man, would be questionable. You’re viewing God as some kind of non-transcendent entity like a king.
And therein lies the rub!
Based on your subjective choice of whose mythology you accept as your god, all its actions become “moral” in your sight. Just as you equated the slaughter of the infants by a man who heard another man say that his god wanted him to do it, as “moral” since you chose to believe this is what your chosen god wanted, so too can a Muslim make arguments about the violent commandments in the Quran.
Ultimately, it’s all subjective and the acts of your god become “good” just because you’ve retroactively chosen to define what “good” is to allow this chosen god of yours, a moral pass.