You want democracy to be prevented from acting out on its passions by a balance of powers.
IN the brazil case, the state powers, and the brazilian voters are not preventing 1 judge from acting out his passion "to protect democracy". Ergo, this is the problem. The mob is granting him this power, when in fact it should be voters, via congress or even the office of the president which brings this loose cannon of a judge back within the powers given by the constitution of brazil.
In this case, brazil is behaving like a raw democracy. It is true majority rule. Laws apply as the majority sees fit.
Hope you don't end in the minority.