That's a great idea in theory. It should be voluntary from gun makers. Giving any gov control over something will turn so so bad, it will be cruel and tragic as soon as welfare to work moron to oversee the new Department of Duh gets a little power.
I remember a Park Ranger pulling me over on my dirt bike and going over it to look for any violation. He checked for oil and fuel leaks and even shined a light down the tailpipe to check for a spark arrester. I didn't know what that was but he found the one in the muffler damaged and gave a 13 year old a ticket for it. I could see them doing random safety checks like that at a gun range too.