This isn't entirely true. Civilian firearm ownership can make occupations more dangerous for invading forces. Obviously, if an enemy wants to level your city with bombs and artillery, rifles won't help you, but often this isn't their intention.
An alternative solution might be "media control", less reporting and headlining of shooters and shootings, to prevent copycats, sensationalism and the appeal of making a "statement" of this kind by going out and killing a bunch of people. Events like this percolate through the public consciousness and eventually erupt again; shooters are inspired by the stories of other shooters. This story itself might be more deadly than the gun the shooter was carrying, in the long run.
Rather than attempting to restrict the activity of the 99.9999% of people who don't commit mass shootings, perhaps we could build a media culture that isn't built on making money off the selling of lurid stories of violence?
If the 2nd amendment doesn’t protect machine guns because they’re more effective than muskets then why should the 1st protect television and data networks when they’re much more effective than soapboxes and handbills?
Clearly we need sensible speech control laws to limit the harm caused by sensationalism, fake news, propaganda, and pornography. In fact, we used to, but they were either repealed or enjoined[1].
[1] https://foreignpolicy.com/2013/07/14/u-s-repeals-propaganda-...