There are about 5 million AR-15's alone in private hands. Gun control measures will do little to reduce harm from determined, murderous school and church shooters. They'll get such guns some way. Potential killers like them frequently publish warning signs on social media. This is a part of the "oversharing" phenomenon that Facebook, YouTube, Twitter, etc. have stimulated, inviting us to engage in which we now regret!
It may never be possible to "detect and fix" everyone with high probability of mass violence. Neither lobotomy or thorazine was completely effective. As we progress scientifically, more and more substances and devices that are potentially destructive, even lethal, become available; think: gasoline, grill propane tanks, toxic weed killers. On the other hand, must some such people be locked up forever? Is there no place that a few such people can live freely, without being caged forever? Maybe we as a society should consider banishment. A person who has taken the life another has taken his victim away from the community of humans. So, instead of putting him to death or life imprisonment, effective banishment to a very underpopulated area such as a Devil's Island, remote jungle or frozen preserve where to survive, he must work or die, might be considered fitting.