If you think about the population of the world at those times it was pretty incredible what they did
The population of the world was about 50 million (climbing to 100 million at the time of Khurush i.e. Cyrus the Great )
Egypt would have been maybe 5% of humanity...
Quibble, the population of just the Americas was higher than 50 million when Egypt was in its Middle Kingdom period. The riverine societies in general wound up developing massive food surpluses which made everything else, every kind of kraft, possible and fruitful. Egypt’s population, then as now, was nearly entirely living within just a few miles of the Nile, and were concentrated, and of course divided into de facto city-states, not to mention the Upper and Lower countries. Egypt was in part conquered plenty of times, but thanks to its length, it was quite difficult for a conqueror to grab the whole thing, and there were good reasons not to care about the more distant parts.