Yes, it's horrible and complicated, and there is no "good" solution.
But I believe that protecting innocents is morally superior to punishing the guilty. Innocent Israelis and Gazans are being freed, along with (probably) some despicable people.
But acting morally may yield strategically and utilitarianily harmful outcomes against bad faith adversaries.
Personally I think this was a geopolitical blunder of Israel and western interests. The net outcome is favorable. But it could have been much more favorable. I suspect we’ll see a gradual reconstitution of Iranian based power.
But I believe that protecting innocents is morally superior to punishing the guilty. Innocent Israelis and Gazans are being freed, along with (probably) some despicable people.