I think, that it is difficult to prevent any unification of Egypt or Mesopotamia in the long term.
I think, that there is some trend to form larger Empires.
It is interesting to see, that from Sargon, to Assyria, to the Neobabylonian Empire to Persia (there are of course many other empires in between) increasingly larger Empires evolved. Still between these empires are often ages of dis-unification and balkanization.
Even if foreign invaders somehow overrun Egypt, after some time, they could adapt to the region. After some time, their states could become unified. The result is maybe not OTL-Ancient-Egypt but still an important power in the region. The same goes for Mesopotamia.
If you use ecological disasters, you need to separate between reversible and irreversible disasters. If there is a massive and really long drought combined with some other disasters, you could probably delay the development of civilization in the region. (And create some sort of collapse for maybe several generations). This could favour some neighbours if they are not affected, but would destroy larger trade networks. The geographical situation still favours the development of civilizations in Mesopotamia. Therefore, I predict some kind of recovery after the end of the disaster.
I don't have an idea right now, but if you create a disaster, which changes the ecologic/climatic/geographical background irreversible and unfavorable for the development of cities, then you could prevent the unification of Mesopotamia, but at the price, that Mesopotamia isn't the "crandle of civilization" anymore.
But I'm not an expert on this time and this region.
If we have many city states close to each other, with a lot of conflicts, it is quite reasonable to assume, that after some time, someone has enough luck to conquer enough city states to form a larger political entity.
If you want to change that, you need to change the basic conditions and reasons which lead often to the formation (and often the fall) of empires.