I think we're looking back at history with rose-tinted glasses here. Toxicity has always been around. Maybe in recent years it has grown, but I think that's just the nature of the technological beast.
It doesn't mean that on a broad scale technology always actively contributes to making things more toxic- but just that it amplifies and contributes to all sorts of things, and that includes the negative. We're more connected than we've ever been, and the unfortunate side-effect is that the degrees of separation between us and those that are toxic have been significantly reduced. Anonymity is maybe a small part, but there are plenty of openly toxic people, both online and off.
Toxic people are just toxic people and I think it's a social issue that is just always going to exist at some level. Maybe there are ways to use technology to assist in fighting against it and maybe not. I think it's just a potentially-unsolvable complex problem that will always arise in society.
I don't know the most effective ways to fight it. However, I'm trying my best not to contribute to it, and maybe personally fighting it within myself will have an outward effect on others. While I wouldn't say I'm mean/toxic/etc online, I do try to stay self-aware of my actions/reactions/emotions and what I post online (and have failed to do this sometimes) because it's very easy to get caught up in negative news/misery and then it's easy to branch off from there into an unhelpful level of anger/negativity.
I try to do my best not to assume the worst of others, to realize there are beings with entire lives unknown to me behind every screen name (if it's not a bot) and to realize it's sometimes difficult to properly infer the tone of what someone is saying online. It's still an internal work-in-progress, but I think I'm far more mindful of my behavior now than in years past.