This is what I have been saying all along, the best way to prevent children from potentially harming themselves/others with firearms is to properly educate them on the matter. Nobody likes getting injured, especially not kids, so it's pretty easy to keep children safe simply by warning them of the potential for injury or death associated with various dangerous things, yet so many parents completely neglect to do so.
My parents kept a loaded .38 Revolver on the mantlepiece above our fireplace in the living room, yet neither I nor any of my siblings ever touched it because our parents simply told us straight up that guns were dangerous and could seriously hurt or even kill us if we touched it. Sure, there was more to it than that, such as an exchange of questions and answers between us/our parents, but that's besides the point.
The point is, if parents would quit acting like children are utterly incapable of understanding simple concepts that the average animal is capable of grasping, and treated them like small/inexperienced human beings, then we'd have a lot less kids playing with matches, electrical equipment, firearms, chemicals, and all other manner of potentially dangerous household items.