The ideas presented are some of the most thoughtless brainstorming I have ever heard. Brainstorming is good but some filtering should be the next step and certainly before you tell anyone your ideas.
First. Put computer into guns. Like they can't be hacked, turning your gun into your own worst enemy, shooting where you dont want or not shooting when you do.
Have building sensing. As if sensor signals can be suppressed or overridden. Like the Drones snagged by Iran which tricked it into landing inside Iran, intack if the stories are to believed. Or the hacks to turn the traffic lights to your advantage.
Lets say you have building sensing through some suppression signal. What would be the default behaviour. If you did not get the signal then allow firing, or not allow firing. Well probably the signal would allow firing (the default). Maybe a little aluminum foil on the antenna would trick the gun into allowing firing.
Biometrics, only prevents someone else from picking up you gun and using it. Doesn't help if its your gun that you want to clear out a school with.
Maybe some combination of all those things would be good. It would make the cost of a gun prohibitive and we would have fewer guns which translates to fewer gun deaths.