still think the immediate solution is to focus on the first verb.
keep the weapon so it is secure against use by anyone but the licensee - eg a robust lock on the trigger, a secure locked box. raise the consequences for the licensee if a third party uses the weapon to harm anyone. register users and exclude people with any kind of mental illness.
this doesn't solve all the issues, but i think it limits the risk of mentally ill people getting hold of weapons.