The ruler of Egypt was a great king. Could any other king, especially an unseen, non-temporal monarch, be mightier than he was? Could a Pharaoh be answerable to any other power?
It is one of the radical principles which Judaism taught the world that there is a King who is higher than any earthly king. Like the king of Persia who boasted of being the king of kings, every proud and arrogant ruler learns that there is a Supreme King of Kings.
As Pharaoh and his armies are defeated and the Children of Israel cross the waters on dry land, so every tyrant is finally toppled and those whom he oppresses emerge into freedom.
Assyrian kings, Babylonian kings, Roman emperors, dictators in all ages – they all have to learn this lesson in the end.
It is not merely a lesson for gentile rulers. It applies to Jewish leaders too.
The Israelite king has to carry a Torah scroll with him at all times (Deut. 17:19) as a sign that even he is subject to a higher power.