Sentiment analysis can solve the first. If the algo notices that someone only engages negatively with another cluster, cut it off; they're not entitled to pollute that.
And the second point was a mostly abstract intellectual debate in the early 2010s, but people have proven that they absolutely prefer to stick with their own, and have close-to-zero tolerance for dissent or disagreement (see, "the hivemind"). Twitter is far more prone to this than Facebook, since it's founded on communities (i.e. clusters) rather than just friends. Twitter just needs to stop putting junk into people's feeds; and silo them better to reduce harassment.
That would also reduce polarization, since a yuge cause for polarization (far-right, antifa) is a knee-jerk reaction to the very worst content from the other side. Stop promoting that, and you'll stop the "Brainwashing Of My Dad" effect (the film), where a conservative from Texas gets upset because of bathroom laws in California, or where a liberal gets upset because of a few 4chan trolls.
It's the psychological phenomenon of "enmeshment": remove the boundaries between people, and you make their relationship very toxic and conflictual. Enforce better boundaries, and their relationship will be far healthier. Twitter promoted the former; Musk can avoid most of the upcoming "hell" being predicted by doing the latter.