There are no records of how the Egyptians first encountered their neighbors. Speculation based on some known events, the encounters may have first been explorers on the Mediterranean sea or on the Egyptian water ways.
Explorers like bees return home and traders follow. Traders return to their home turf with stories of wealth, and rulers send their militaries to rob or enslave the population.
While we hear the stories of supposed Canaanites moving in on the Egyptians, some how the history of Egypt's invasions/expansions are lost.
The Canaanites were Egyptian neighbors by land. Phoenicians or Hittites who wanted to get to Egypt would either have to pass through Canaan or arrive by ship.
MIGRATING TO EGYPT BECAUSE IT WAS PROSPERS?
In ancient times, there were no stock markets. Populations were made up of royalty & their police/military to make the commoners obey.
The business of the population was farming/herding and businesses directly related to eating or survival.
Unless there were a famine, a tyrant ruler, or a reason to flee, no commoners would survive any better in Egypt than they would in Lebanon, Canaan or Turkey.
The idea of a mass migration to Egypt by the commoners is quite humorous. As for any royalty to migrate out of their own land, duh ?
Rulers thrive no matter if the commoners are living in poverty. If rulers want the wealth of other lands, they send their lemmings/military to invade and fetch the wealth.
Rulers in times past, did go with their military forces to fight (watch the fighting more likely), but rulers never gave up their own empire/strong holds, to migrate to another land to become farmers/herders themselves.
There is an extensive web of rivers that enter Egypt from the north. This web leads to the Nile River.
The Hittites and Phoenicians could have taken a long journey through Canaan to reach Egypt or they could have made their voyage by the sea.
This extensive web of rivers was also the door way to Egypt by the Greeks and Romans.
As the Nile river runs south, it enters Cush/Nubian/Sudan and would be the best way for the Egyptians and Cushites to trade.