I think this is the wrong question to ask tbh. Imagine a country invaded Britain, forced all of us to live in Aberdeenshire, controlled the borders, food supply, energy, and everything else. Suppose the most powerful countries in the world sided with them doing it, and refused to recognise us as a country. There can be no doubt we'd have people that would violently lash out too.
What I'm saying is I don't necessarily think there was a massive strategic objective behind Hamas' attack. More like just rage and an opportunity. And I don't think risk assessments will have been a big part of their planning either.