"Collective punishment" isn't a legal category in the Geneva Convention statute. Reread it and see that neither of these two words appear in it.
But Hamas turning undefended civilian objects into military targets, seizing, holding and torturing hostages, engaging in mass rape, preventing Gazan civilians from evacuating and seizing humanitarian aid meant for civilians are war crimes under the statute.
Israel has committed war crimes if there are civilian deaths attributable to the IDF that are not unintentional.
All civilian deaths attributable to Hamas were intentional, as its captured planning documents show. There's the difference. Your lawyer flunks the bar exam.
I'm not a lawyer. But as a real estate and startup investor I've read, reviewed, edited and drafted many contracts. So I'm no stranger to thinking like one.