The IDF has killed not just a higher number but also a higher percentage of civilians, and a much higher percentage of children, than the October 7 attacks[0]. Even if collective punishment was considered not cruel but moral by the larger community, Israel has far surpassed it.
[0]: https://en.wikipedia.org/wiki/Casualties_of_the_Gaza_war