This country has tens of millions of guns so since we can not get rid of them all there needs to be a painless way to control them. Many if not most recent mass shootings have been committed with legally purchased guns. A lot of street crime is committed with guns purchased by straw buyers at gun shops.
The technology already exists that would allow for foolproof gun management.
All guns should be required to have tracking devices installed similar to what is used in telephones. This could be done at the point of manufacture, or even at gun shops and police departments.
You should not be allowed to buy bullets if you could not show that your weapon has the tracking device installed. Penalties could be stiffened not for gun ownership but only for those who refuse to have the weapons modified.
If weapons are tracked near a school, mall, bank, (or even if the tracking device is tampered with), there could be a rapid police response far before any incident takes place.
If you are only storing your weapons for game hunting or self defense then you should have no fear of having a tracking device installed because criminals and wildlife should not be able to track your guns. If you are storing guns to defend yourself from "tyrants" then you may as well have your tracking devices installed too because chances are the "tyrants" know where you live and that you own guns.