Not by punishing an entire group of people. You see, the problem is that there are limits to what a country can ethically do to ensure security.
You argue that Israel must continue treating the Palestinians as second class citizens because, if they stop, the Palestinians will take over and treat the Jews as second class citizens. You approach the situation as if there's some sort of distinction between Palestinians and Jews which makes it more palatable for it to be the Palestinians that are mistreated. Others don't see that distinction and approach the issue with the notion that no one should be treated as a second class citizen. That's where this whole argument between the two sides occurs.