If it were me, I would kill 10,000 people in all of the non-Israel areas (Gaza and "Palestine")...every day...until they're begging to stop...until they all openly express how wrong it is to attack Israel.
There's a reason it's been almost 80 years since an American said, "Gee, Wally. I sure hope Japan doesn't attack us again." Same for Germany not attacking Europe or Russia since WW2 -- Germany lost too many lives at home at the end of WW2 (unlike how WW1 ended or the Franco-Prussian war, which IMHO is why we had WW2).
Yes. Countries tend to shy away from wars if they have a history of their citizens suffering terribly in previous ones. There is an old adage: Wars are won or lost at home.