Yes, you can probably build or smuggle a gun if you're determined enough. I'm OK with stopping "the dysfunctional, mentally ill" you mention, and having them be outright illegal increases the chances of someone seeing them and tipping off the cops, being dunned in by an informant, or them being intercepted at customs, a traffic stop, etc.
You correctly highlight that this sort of thing is difficult, and won't ever be a 100% solution. Your apparent conclusion - that we shouldn't ever do anything - doesn't logically follow.
Based on my experience (in the US), almost no one outside of "firearms enthusiasts" is capable of distinguishing between legal and illegal configurations. In many cases, even those who do know the specific differences aren't in consensus on what is legal and what isn't.
An AR-15 is a Class E firearm - unless it has a thumbhole stock, no "bad" features, and 7-round magazines. In that case it's a Class A firearm.
If the majority of school shootings etc in the States we're stopped by the populace with guns then yeah I'd agree with you.
I can literally bake a lower receiver out of plastic in my oven or make one on my 3D printer. For something a bit nicer I can buy, and setup a CNC machine which only cost a few thousand dollars.