So would preventing anybody who has history of domestic violence or history of abusing animals from legally accessing firearms.
And making sure there is only 1 entry point for schools, which is only unlocked to allow people inside when the office approves it (meaning all doors to outside are always locked from the outside).
That would eliminate school shootings like this almost entirely.
Of course you'll still have illicit activity on school grounds after hours, which is where the vast majority of "school shootings" happen. But we're going to have to get serious about our social policies.