Within Israel, the vast majority of people don't particularly care about any kind of manifest destiny style reclamation of the West Bank or Gaza, and if that were the only issue, I genuinely don't think there would be a significant problem.
What essentially everyone does care about, however, is repeatedly having rockets lobbed at them. When people feel under threat, reason starts to fall away, people begin dehumanizing the "other", and you get the massive mess we have today. The fact of the matter is that Israel will never accept any situation where its people are under threat. No matter what you think about what acts are or aren't justified or your opinion on how various parts of the history played out, none of that changes this basic reality.
Palestine is not going to be able to militarily eradicate Israel. There is precisely zero chance that Israelis allow themselves to be subjected to a second diaspora and they'll fight to the death to prevent this, and that's to say nothing of external players like the United States. Again, whether you think this is a good thing or a bad thing, it is a true thing.
On the flip side, Israel is perfectly capable of essentially eradicating the Palestinians, though this would subject it to massive international condemnation that would also have huge economic impacts. You're already beginning to see whispers of this as the world increasingly sees Israel's response in Gaza as being excessively harsh. The most they could do is a slow and steady degradation of Palestinian society while encouraging them to "voluntarily" leave, which is arguably what the strategy has essentially been under Likud with settlements and the like.
So, what's required for a peaceful co-existence? Firstly, you need a mutual acknowledgement from both leaders (and also, a legitimate Palestinian leadership in the first place) that the other side exists and has a right to do so, ie, Palestinians giving up on the idea of eradicating Israel and Israelis giving up on the idea of fully annexing and ethnically cleaning Palestinian lands. This is not a trivial thing. The Israeli far-right, though they're not dominant, are growing and believe they have a divine right to the West Bank, with the Arabs being seen as little more than animals in the way. The extreme Palestinian side is that all Israelis are essentially foreign invaders and should be forcibly removed or killed. Both of these positions must be completely taken off the table.
Secondly, Israel will not engage unless it is confident that its security will not be threatened, which will in practice mean that Palestinian authorities must be de-militarized beyond what's necessary for basic local law enforcement. Again, this might seem unfair, and hell, it probably is. But the fact of the matter remains that Israel is the side holding the guns here, so you either play by their rules and try to find some positive outcome, or you flip the table and enjoy the complete loss, but with some moral satisfaction. Similarly, there would probably need to be some kind of border controls for imports that Israeli authorities can inspect for covert weapons shipments, since it's a known thing that Iran does regularly try to bring weapons into Gaza. Ideally, this would be some kind of bi-national force with Palestinian cooperation.
If you reach these points, then you still have other very big questions to deal with, like precise borders, land swaps, the question of Jerusalem, how to connect Gaza and the West Bank, any right of return for displaced Palestinians both recently and during the Nakba, and plenty of other things I'm sure I'm forgetting about. But ultimately, if you have a Palestinian and Israeli leadership that are actually interested in peace and accept the existence of the other, and both agree to cooperate on matters of security and prioritizing that peace above and past grievances, no matter how legitimate, that gives you a real foundation you can build from.
I wouldn't get my hopes up though.