We often use the word "democracy" as the vast eco-system underlying and upholding modern liberal societies in general, not just the elected parts. Whether that's correct use of the word - I suspect you think it's not - I leave open for discussion. If you want I can use the narrow definition in which case we are mostly in agreement.
Judges should exercise due caution and be mindful of their obvious biases.
However, this works both ways. Officials cater to their often not so well-informed electorate and this group, The People, is as susceptible to biases - if not more - as the so called elites are. Both should exercise restraint and be mindful of their biases, not just the judiciary. It takes a populist to claim The People are always right.
As you can tell I am also very much an amateur. I suggest you don't approach me as someone who has studied political science because I'll have a hard time keeping up.