Set up a mandatory government run insurance program for all new firearms sales. If you are a 40 year old farmer with a shotgun stored in a gun safe then insurance is pretty cheap. If you are a 19 year old with an assault rifle then it is eyewateringly expensive. The risk that you will do something harmful with the gun is priced into the cost of ownership.
One of the criticisms of gun insurance (and of any gun control measure in general) is that there are so many firearms already in circulation in the US. So take the proceeds of the insurance scheme and use them to buy back guns.
Responsible gun owners are not inconvenienced, we reduce risky firearms sales and slowly draw down the number of uninsured guns in circulation.