It's a balancing act, JC. The courts utilize the Constitution to rein in the most unappealing aspects of democracy. Nothing is guaranteed to work well. That's why you have the SC doing bad shit like Alito.
OTOH, the US has a well-honed and long-established track record of appointing bigoted asshole judges. The reason most Southern states elect their state Bench was to make sure that no meddling Yankees appointed the "wrong type" of judge. That's how you get crazy good old boys like Roy Moore sitting as Chief Justice of AL.
Be serious:
The big fallacy people have is that the Supreme Court is there to enforce justice, the rights of people and moral rules.
Lawyers, the courts, i.e. the legal system never does anything like that. The legal system, including the SC is there to justify what the ruling class wants. In the entire history of the human race, the legal system, the lawyers and the courts have without exception been servile to the ruling class.
Everything Hitler and Stalin did was sanctioned by the legal system and the courts. The best legal minds in Russia and Germany justified everything that was done. And in America, the Supreme court for 200 years sanctioned race segregation, women's inability to vote, and heaven knows what. The Constitution allowed that. More recently, brilliant lawyers in USA justified torture of detainees. The SC was fine with that too.
Why would anybody now think that the SC would do what is right?