Seems to me that the biggest problem in US politics is that your judiciary isn't independent. If that were fixed, this mess would never happen again.
Independent judges, not politically appointed and hired in competition with others by an independent body of peers and with a separate ethics body with the power to put a judge on trial for misconduct. None of the involved are at any point appointed by any politician.
As an aside, this is the way it is in Sweden, so maybe it's too socialist for y'all.
ETA: Thinking more about it, it's probably more complicated than I originally thought, and to achieve a truly independent judiciary, you'd need a cultural change.
Let me explain, again using Sweden as an example: A judge in Sweden works in an office in an office building with other judges, administrators, 'secretaries' (we don't call them that anymore), security personnel, janitors etc. They all eat together. They have their
fika together. They have Christmas parties and celebrate each others birthdays and go on office conferences. Each judge is just another employee. Sure, he or she is an important - crucial even - part of the office, and has the power to affect the handling of any individual case within their assigned lot (a case is divided among judges using a lottery system), but they aren't untouchable bastions of unattainable glory. They get payed more than the rest, so they have nicer clothes (generally), but they are just Lars, Susanne or Monica with the janitors. This includes the supreme court justices.
This culture is essential because it ensures not only that the judge is centered in normalcy and has the ability to visualize what the impact of their decisions would be on the common people - because the guy in the office next door is one of them, and he just bought chocolates for the entire office yesterday - but also to make them understand that they are just employees, and they will not remain a judge if they screw up.
My advice for the US for the future - provided you ever get the chance: de-dramatize the role of the judge in society and work on setting up a system to hire judges that isn't dependent on the whims of a - possibly deranged or fascist - president with a sycophantic congress.