As we can see with Nazi Germany, democracy can be a dangerous thing. Many countries try to override democracy with a special status of the supreme court, able to invalidate the parliamentary laws (to some extent, as in current day Israel).
(This is a very discussed topic in Israel just before the 2019 elections).
Regular people and Rabbis with them can blindly follow false-prophets, false-Moshiachs, and false-Rabbis, each presenting his own interpretations to the existing sacred texts.
So if a person comes and declares himself as G-d-sent / Ruach Hakodesh or whatever and commands on breaking the basic laws of Judaism (Shabbos, Taharas Mishpachah and so on) by either claiming "עת לעשות לה'" or "הוראת שעה" or even (mis)-interpreting the Torah and causing the current Gdoylim to agree and join him, and we do "עשית ככל אשר יורוך"...
Is there a mechanism in Judaism for protecting it from such a misuse?
The question is intentionally not about personal behavior (should you follow or not), but about the existence of such mechanisms.