With the first presidential debate just finished, how do politics work in the Oz books?
Well, The Wonderful Wizard of Oz is very much a story about political upheaval. No, I'm not saying it was a political allegory, the politics are right there.
Dorothy lands in Oz, her house killing a Wicked Witch who happened to rule the Munchkin Country. The Munchkins are left without a ruler, save the mysterious King of the Munchkins mentioned briefly in Ozma of Oz and The Road to Oz. (Appearance so brief, most people forget he exists.) Taking into consideration the entire Famous Forty, they have no ruler until The Giant Horse of Oz when King Cheeriobed is assigned the task.
Dorothy and her friends go to the Winkie Country and destroy the Wicked Witch of the West. Almost immediately, the Tin Woodman is assigned as her successor.
Finally, most importantly, the Wizard leaves Oz and names the Scarecrow his successor.
The Marvelous Land of Oz has even more politics, with Jinjur uprising against the Scarecrow and overthrowing him, and while he manages to make her flee the palace briefly, she is eventually ousted by Ozma.
Furthermore, it's revealed that the Wizard had usurped the throne from Pastoria, but as Dorothy and the Wizard in Oz exposed, it wasn't that simple, really.
Ozma tells us in Dorothy and the Wizard in Oz that the four Wicked Witches of Oz leagued to depose the king, who was eventually taken by Mombi. This was Ozma's grandfather, and she and her father lived in this captivity, revealing that the Wizard himself would have found the Land of Oz without a central ruler.
Baum rarely does political shake-ups of this scale again. In Tik-Tok of Oz, Ruggedo the Nome King is deposed and replaced by Kaliko. The Scarecrow of Oz sees government reform in Jinxland as new, young rulers take over from King Krewl. Rinkitink in Oz sees the overthrow of the old monarchy of Regos and Coregos, and changes of rulers happen in Glinda of Oz for the Flatheads and the Skeezers.
Generally, this was par for the course with Baum. Are there wicked leaders? Replace them with good leaders. This also happens in Sky Island and some of his non-Oz books, including some books in The Boy Fortune Hunters series. Political upheaval is the plot of Fate of a Crown and also plays a role in Daughters of Destiny, in the exchange of rulers. Politics are also the plot of Aunt Jane's Nieces at Work, though it is simply two men running for district representative, not quite as major, but it's still there.
Thompson would generally follow suit in her Oz books. Sometimes a small kingdom had a wicked or less-than-worthy leader and by story's end, they'd be replaced. Sometimes the proper rulers had to be restored. Occasionally, Ozma would be ousted from her throne, but—usually with help from a new friend—things would quickly be set to rights again in short order.
Most of the rest of the Famous Forty leaves the status quo as is for Oz. Merry Go Round in Oz finds a new king needed for a country, who is found. The Mimics successfully invade Oz in The Magical Mimics of Oz but they are quickly repelled once Ozana, Ozma and Glinda arrive on the scene.
The most fun example of politics in Oz is found in The Wonder City of Oz by John R. Neill, though I have heard this plot was created by the infamous editor. Jenny Jump arrives in Oz and asks about the next election (I noted that 1940, the book's publication year, was an election year). Ozma allows an "Ozlection" and she and Jenny run against each other, having a gentle competition for each others votes. No mudslinging is involved. Ozma eventually wins, Jenny throwing a fit, later placated by the newly created role of Duchess.
Generally, Oz is depicted as a monarchy. Before the Wizard, it seems it was a family line was the standard procedure for successive rulers of Oz. Like in the Old Testament of the Bible, if a ruler is ousted, their conqueror takes their place. Save Wonder City, Oz is not a democracy or a republic. The Emerald City of Oz reveals that there is a fair bit of communism at work in Ozma's rule as well: everyone shares with everyone else, paying some sort of tribute of their wares to Ozma, which she uses to provide for those who can't get help elsewhere. It is suggested that free enterprise is allowed and encouraged, just money is not involved.
While there is a good deal of political activity in the Oz books, we never get the same upheaval as we do in the first two books. For this reason, fans such as John Troutman and Gregory Maguire have stated that while they enjoy the latter books, they never reach the same level of intrigue as The Wonderful Wizard of Oz and The Marvelous Land of Oz.