I generally hate the "both sides" argument that has become prevalent with moderates these days... but I really am sick of both sides here.
You set up a scenario that suggests Israel won't commit atrocities b/c it's the only way for it to lose American support. However, I don't think that's the way the approach the issue -- first, Israel correctly assumes that in general America will tolerate a brutal crackdown in response to terrorism. There are ample examples of human behavior that show we're willing to be brutal to others if we are scared -- and launching a terror attack that killed over a thousand people and raped dozens if not hundreds and kidnapped more, is frightening. There is very much a natural human reaction to want to hit back with everything no matter who gets in the way. Israel assumes America will side with them in that reaction. It doesn't mean it's a good reaction morally or even from a long term effectiveness. But it is understandable... even to the point of mass displacement of millions of non-combatants, women and children.
Second, Israel has spent decades influencing American political opinions. They have a high degree of confidence that they can lean on that no matter what they do in the short term. Especially when they have a precipitating event that is objectively horrific.
Finally, I think you might underestimate how much contempt some of the more extreme members of the Israeli population has for Americans, Christians, Arabs and Muslims. And that extreme wing has an outsized seat at the Israeli government's table. They are a definitive minority in Israel, but larger than you'd think and they wield outsized influence in the government. They really will push the bounds of what is acceptable, American opinion be damned. They also want from the river to the sea -- only all Israel.
As far as Palestinians being supportive of Hamas - that is not entirely true. They had elections decades ago, and Hamas got a plurality, but less than 50%, and they ran on economic issues at the time and criticized the very corrupt Palestinian Authority. Since that time they have squashed any opposition and about half of all Palestinians in Gaza were not even born when the last elections were held. It's really hard to say they support Hamas, when all you have is a police state there.
However, you are of course correct that there is tons of propaganda in the Palestinian population that begins from a young age, and anti-Semitism is virulent. You can say that it's a natural outcome of being conquered and then held under military occupation with limited rights for 70 years. Which is somewhat true -- in that, just as I can understand a brutal Israeli response to decades of terrorism, I can understand violent Palestinian reactions to brutal crackdowns and military occupation. It also doesn't make it moral or a sound long term strategy.
What all of the excuse making for both Israelis and Palestinians ignores is that people still have agency over themselves. I've been there, and they all have the internet, fairly open -- they have access to more information and books and so on. It is certainly harder for them, than for those of us who live in relative peace and security... but it is still all out there for them.
At this point, I'm ready to walk away from the whole mess -- basically say not a dollar or weapon more to anyone until they agree and make positive steps to enacting policies that affirm the right of every single person in that region to live in peace, security with a functional viable government that they believe represents them. At this point, I don't think we can dictate what that is -- they need to do that themselves, but we don't have to keep supporting this clusterfork.