None of that relates to this murder as based on the description of settler concerns, which are more of an issue in the West Bank rather than Gaza, I’m guessing that this happened in the West Bank. (Where Hamas is not the government.)
Whether the murderers are IDF or settler militants is immaterial to the point of this being an unjustified killing of a Palestinian shepherd living in the West Bank, who is rather unlikely to be a Hamas fighter or involved in the 7th October attack.
Do you know that he didn’t take a gun safety course? For all we know, he could have had plenty of knowledge on how to safely handle a firearm and simply decided to ignore it for the sake of looking cool. The fact is that no amount of safety training can stop someone who decides to do something stupid.
I absolutely agree with your last point though. There should be extensive training in how to handle a firearm safely required before someone can buy a gun.