When a democracy degenerates into tribalism, it enters into a period of conflict until somebody manages to transcend the tribal conflicts. This individual has the potential to become a king if he so desires.
The king remains in control for his lifetime and his son will likely also hold real power but eventually you get a king who doesn't want to be bothered with the business of government when he can be doing other things like hunting in his personal forests. So the king relinquishes most of his power to the nobility and you get an aristocratic government.
This aristocratic government, at first, wants to rule for the good of the people. Eventually, after several generations, it serves its own interests instead creating a crisis. At this point, the king can re-assert real power and restore an absolutist monarchy. Or the wealthier portion of the common people can decide they want some power too and gradually get some of it from the nobles.
Once the wealthier portion of the common people have power, the general logic of democracy is to expand the suffrage. This is a one way ratchet because no politician can hope to win elections running on reducing suffrage. So you gradually end up with a mass democracy. Eventually, this mass democracy degenerates into tribalism and the cycle repeats itself.
This cycle, which was recognized by Polybius and called anacyclosis, played itself out in both Athens and Rome in antiquity. It is likely playing itself out yet again in our own time. Because human nature doesn't change and all governments degenerate.