It must bear in mind that democracy itself has only recently (the last hundred or so years, and then definitively after World War II) come to be regarded as a "good thing", and the meaning of democracy and the republic has changed over 2000 years. Indeed, it has even changed radically from the Age of The Enlightenment to the present day.
Modern day democracy in truth has aspects of governance and society that combines the best features of The Good Kingdom and The Republic. Every democratic nation has an executive body of a President/Prime Minister and their cabinet. This form of day-to-day running is closer to how strong Kings and Emperors ran their domains with their groups of advisors, than the sortition and direct democracy of ancient Athens. It also bears bureaucratic resemblance, but not linguistic resemblance, to the original function of the Dictator in the Roman Republic with the dictator Cincinnatus famously being regarded by the George Washington as his role model. Likewise, modern democracies govern over vast areas, with large populations, when historically democracies and republics were far more widely seen in small city states with small populations, all of which were consequently swallowed into larger kingdoms and empires, with the original Roman Republic being succeeded by the Roman Empire after the many problems between the Senate (made up of the Aristocrats) and the Plebians (what we would call the People) kept growing as a result of Roman expansion and lead to the Populares, from which Julius Caesar himself was a part of.
For a long period of time, the main argument in favor of the Kingdom and the Empire was that it was the only form of government that could govern over large populations and large areas. A Kingdom at its best had a system of vassalage and clear arrangment of society from top-down that allowed for efficient functioning of the various parts of the Kingdom and promoted a common cultural identity amongst its subjects. In the King, everyone was theoretically a subject and subjects could appeal to a recognizable and stable authority for justice, in theory at least. Certain features that we consider proto-democratic were originally created and instituted by Kings and Emperors. It was King Henry the Second of The House of Plantagenet who created what we consider The Common Law, the basis for laws and democracy in England, United States and the Commmonwealth and it was Justinian I of the Byzantine Empire who promoted the creation of the Corpus Jurius Civilus, the basis of the modern Civil Law used by the countries of mainland Europe, Latin America and many others.
On the other hand, Empires allowed a degree of cultural diversity that was tied to each of the Kingdoms or territories that were governed by the Emperor while embracing a supranational identity, promoted by other types of cultural unity such as religion, identification with the greater state or ties to a ruling dynasty. This is one of the reasons the term was kept being used in the West during the Middle Ages in countries such as Germany (then the Holy Roman Empire, which stretched through modern Germany, Luxembourg Switzerland, Czechia and Austria and parts of France, Belgium, Netherlands, Italy and Poland), Spain (at the time non-existent as a country, but as a region synonymous with the Iberian Peninsula and most famously composed by the Kingdoms of Castille, León, Navarre, Aragon and Portugal, leaving out the Muslim Kingdom of Granada and the many other Kingdoms and Tiafas that rose and fell across the centuries such as the Kingdom of Galicia) and eventually Russia in the Early Modern Period (beginning as the Tsardom of Moscow to then encompass the entirety of what we would call Russia now and more, the original term of "Tsar of all the Russias" takes more meaning when you consider that at the time what we could call now Russia had been an amalgam of various slavic states such as the Republic of Novgorod or the Principality of Kiev).
Philosophers of the Enlightenment in England, France and America sought to combine the best features of the Kingdom and convert it into a Republic that would in theory govern over a large area of land, safeguard liberties and provide room for popular sovereignty. The classic Republics of Greece and Rome were cited by these authors but some of them agreed that aspects of Athenian and Roman societies — slavery, cultivation of an aristocracy of representatives (yes, that's right, aristocrats originated in democratic societies), war of hegemonic expansion — were antithetical to a "modern" Republic, and in many ways Not So Different from The Empire. Even then the governments that were finally formed, in America and in England did make caveats allowing for slavery and colonialist expansion, while the First French Republic finally did give way for Napoleon and his Empire. So while the Age of Enlightenment put a finger on the Republic-Empire divide it did not provide the final answer. That answer would itself be formed by diverse movements and interactions across the world in the 19th and 20th Century.
As a result of Values Dissonance and Society Marches On, it can be hard to appreciate how ancestors were content to live and serve a corrupt empire when obviously republics are better. The problems of government structure, size of land and diversity of the populace are common to both Republics and Empire and neither form of government ever existed in a perfect vacuum where one can choose one or the other in what-will-govern buffet. So a good story that uses this trope will provide nuance and understanding of the challenges facing a republic in conflict with an empire or a kingdom, and pay attention to how subjects relate and behave in relation to both.