Hamas is armed with pretty fine weapons including the latest AKs you can't even get outside Russia, Dragonov sniper rifles, RPGs etc. The attackers on Oct 7th were very well equipped, comparable to most modern military's infantry. This story about how primitive their weapons are is at least partly a lie.
The environment they operate in neutralizes a lot of the IDF's advantages. Dense urban, many civilians, tunnels. You can't bring F-35s to bear if you have battles inside your own towns. It took the IDF about 3 days to recover from the initial attack including scenes like tanks firing into Israeli houses.
There are a lot of Israelis with military background that claim that the Oct 7th attack wasn't far from being an existential threat. Hamas was planning to connect with the west bank and also to proceed much farther into Israel than it managed to. There were some heroics e.g. from the police in stopping that on the roads leading out of the south. In combination with a land attack from Hezbollah in the north that could have been a scenario that has some probability of getting 10's or 100's of thousands of Israelis killed at the very least. It's hard to imagine but then Oct 7th was also hard to imagine.