At least in the case of Israel vs Hamas, this is undeniably true. Everyone knows oppression creates terrorists. Every ambassador knows it, every police chief knows it, every general knows it, every politician knows it. Maybe the average person doesn’t but when it comes to the people running the machinery of government, they know it.
Israel 100%, without a doubt, knew that their apartheid would create an organisation like Hamas. And what do they gain? A plausible sounding cassus belli to blow up Palestinian children with bombs. Hamas is the creation, and essentially the ally, of Israel. They themselves don’t believe it, but it’s true. They’re playing someone else’s game.
You have identified a quantitative difference in that Palestinians are not oppressed in exactly the same way as black people in SA. But you’ve only disproven it’s apartheid if you can identify a qualitative difference. Do you have one of those?