1) "Context" has nothing to do with this. If a person will go and try to kill me\my loved ones I have full right to respond with deadly force. And this right doesn't go away if I (or my ancestors) did something bad to this person (or their ancestors). Even if it is something truly horrible. The only thing I may be judged for are past crimes. My legitimate self-defense is still legitimate.
I mean, Hamas managed to pull off the attack largely because the IDF was over on west bank giving cover for illegal israeli settlers lynching people. Context kinda' does matter. It doesn't excuse the particular atrocities hamas got up to any more than it did comanche raids back in the day, but trying to boil any of this down to self-defense leaves you with a very messy stew, especially considering how staggeringly disparate things are on the capability and actual impact front. There's only one side of this conflict that's actually under existential threat, at this point in particular and even prior to the slaughter raid, and it damn sure ain't Israel.
Since the early 2000s, Gaza is not an occupied territory and HAMAS aren't resistance fighters. Such wars do work differently but it is not what we have there in 2023. Gaza is a de facto country. It has its own borders. It has its own independent government. It has its own armed forces. It is a country and should be treated as such. Formal recognition is that - formal.
This, however, is nonsense. Gaza doesn't have armed forces, they have a terrorist group hiding in a city, and if they actually tried to organize something formal the IDF would have
flattened it. Its government is no more independent than the biggest prison gang in a penitentiary. They have no control over their borders, trade, infrastructure, anything. It's an occupied territory by any definition of the term that makes sense. Paper-thin excuses for why it's totally-not-we-swear are just that, thin as paper.
It means that Palestinians and Gaza are different entities. And Gaza is in no way shape or form fully dependent on Israel. Especially with the border with Egypt. And perhaps, If they would invest more in infrastructure and less in its armed forces, they wouldn't even need electricity and water from Israel.
The unfortunate and traditional Israeli response to trying to build infrastructure in Gaza has been to
bomb it. A great deal of the reason there hasn't been much efforts to do that is because what organizations that are there are entirely aware they don't get to decide whether or not they actually get to use anything they build, and the likely answer to anything substantial is going to be "No", either due to the terrorists that murdered their last government and took over or the folks on the other side of the prison fence with artillery, air support, and a fondness for targeting civilian infrastructure.
West Bank and Gaza absolutely are different entities, though, especially ever since Hamas started chucking what parts of their then-government that had ties to the former off buildings. Probably have been ever since Israel started cutting off or otherwise obstructing as much travel between the two as it felt it could get away with.