Oh wow, that's an awesome idea. Just like there are paper charged higher health care premiums if they're smokers or have a pre-existing condition, so should being a gun owner.
It would just increase illegal second hand legally bought guns. You would basically have the prohibition but for guns.
There really is only one good option and that is to ban the legal sales and ownership of all guns except hunting rifles for licensed hunters, as it is in most of the world.