Thank you; I appreciate it.
Maybe the problem with mass shootings is that there's no single root cause?
Yes, an abundance of guns makes it easier to get one, but if someone is determined to commit such an act, how much harder would guns need to be to deter them? Yes, I do think that guns being -at all- harder to procure is a good idea, but thinking in terms of 'the bottom line', I don't know how much harder they'd have to be to acquire before it would make a difference. Sorry if I'm discussing such a horrific topic in such a forensic manner.
Then there's the issue of what makes people want to commit these acts in the first place. There's mental illness, and the stigmatization of it, which makes people who might benefit from help less likely to pursue it, but what about the shooters who aren't mentally ill (though there's an argument that anyone who wants to do this is mentally ill), or the ones who 'pass' enough that they don't seek/aren't compelled to seek help?
There's cultural/environmental (as in, their circumstances) factors that likely contribute to one wanting to commit a mass shooting, and those are even harder to combat.
Filtering the above through a Trek lens may help to explain why I primarily approached this from a tech standpoint:
In the franchise we primarily see things through Starfleet's eyes, with DS9 being the closest to an exception. Among those in the service, firearms appear abundant enough for anyone who wants one. It's less clear how easy it is for a civilian to get their hands on a phaser in general terms.
As to whether the mass shooter mentality is less common in the future? It's hard to say. People seem generally better off, at least on Earth, but on Cardassia, or on any of the more repressive worlds we saw in the history of the franchise?
Better treatment options for mental illness certainly exist, though we also see plenty of mental illness in the future.
TL;DR Between our limited perspective (primarily Starfleet) into the franchise, what seems to be a greater level of happiness among the people we follow overall, and the presence of better treatment options for mental illness, it doesn't seem surprising that there'd be fewer if any incidents of mass shootings among the people we follow. As discussed before, in cases where one may be inclined to do such a thing, future tech hopefully swiftly mitigates if not outright eliminates the threat.