Tyranny can legally exist in a republic or a democracy.
For instance, Julius Caesar was a very good leader. And yet, he has been assassinated because contemporary politicians, family and citizens feared his successor would be given too much power. They wanted to maintain the Republic and even if they were satisfied with Julius Caeser, they feared his concentration of power would benefit several successive tyrants.
“ Caesar was the dictator of the Roman Republic, having recently been declared dictator perpetuo by the Senate of the Roman Republic. This declaration made several senators fear that Caesar wanted to overthrow the Senate in favor of tyranny. The conspirators were unable to restore the Roman Republic, and the ramifications of the assassination led to the Liberators’ civil war and ultimately to the Principate period of the Roman Empire.”
– Was Julius Caesar a tyrant or a good leader?: https://www.enotes.com/homework-help/was-julius-caesar-tyrant-good-leader-719159
– Assassination of Julius Caesar – Wikipedia: https://en.wikipedia.org/wiki/Assassination_of_Julius_Caesar
Aristotle discussed concentration of power in the book V of Politics.
Aristotle: Politics – Internet Encyclopedia of Philosophy: http://www.iep.utm.edu/aris-pol
Jacobinism is the archetypal example of tyranny in the name of democracy where citizen have only the choice to elect who will be the next absolute leader. This is still the dominant model in democracies worldwide.
Professor Jacob Talmon notes that Jacobins put forward an utilitarian point of view. Central power is the most efficient way to build modern infrastructure (rail, telephone, post, army, etc). But, generally, the citizens support the Jacobin State because it answers their need of political messianism. They have lost it when they discarded the couple king+church who ruled before.
Totalitarian democracy: https://en.wikipedia.org/wiki/Totalitarian_democracy
Jacob Talmon: https://en.wikipedia.org/wiki/Jacob_Talmon