My parents had 5 children. None of us would have ever gotten one of Daddy’s guns without permission.
Of course you cannot train kids who are not under your control. I have noticed some guns now have a key lock which completely blocks the action. That is really not a bad idea when visitors are present.
At other times I would keep it unlocked and ready for action.
Dad’s gun cabinet had no lock.
I knew that if I dared to open it without him right there, my life wasn’t worth a spit in a high wind.
Parental discipline works.