When comparing the longevity of pharaonic Egypt and classical Greece, there are several factors to take into account. First, keep in mind that, within the history of ancient Egypt itself, there are various divisions and upheavals (most notably the division between the Old Kingdom, Middle Kingdom, and New Kingdom, with Intermediary Periods in between). As Stephan Seidlmayer writes:
Egyptologists traditionally distinguish between the major periods of pharaonic history on the basis of the political state of the country. "Kingdoms"—defined as times of political unity and strong centralized government—alternate with "intermediate periods," which are in contrast characterized by the rivalries of local rulers in their claims for power.
It would be a mistake, then, to assume that Egypt represented an unbroken continuity. Rather it was a history continually evolving between various periods of centralization and fragmentation.
That being said, there are several additional factors to keep in mind. First, keep in mind that ancient Egypt was a remarkably centralized political state (possibly the first politically centralized civilization). The classical Greeks, on the other hand, were divided into various city states, often competing with one another. Of course, this did not prevent some city states from attaining a level of hegemony within the Greek speaking world: Sparta, for example, tended to dominate the Peloponnese, while Athens, after the Persian Wars, would construct an empire. Even so, you should keep Greece's politically fragmented nature in mind whenever these kinds of questions arise. With that in mind, studying the Roman Republic might provide a useful contrast, given that it represents a much more unified and politically centralized alternative to monarchy.
All this being said, I do think there is an argument that democracy does trend towards instability and factionalism, particularly in periods of stress. We see this in the history of ancient Athens as well as in the history of the Roman Republic, where this internal instability resulted in civil wars and political turmoil, leading to the transition from a republic to an empire. Even today, one can note the impact of political parties or populist movements in fostering divisions and internal conflict. Nevertheless, what makes this analysis all the more difficult is the extreme rarity of democracy throughout history. Until you reach modernity, democracy is very much a rare, rare exception, with monarchy representing the overwhelmingly dominant system of government.