Esarhaddon’s first campaign against Egypt in 673 BCE failed. He had rushed his troops into battle and was repulsed by Pharaoh Tirhakah and Egyptian forces in the eastern delta. But according to the Ancient History Encyclopedia:
Esarhaddon learned from his mistake and, in 671 BCE, took his time and
brought a much larger army slowly down through Assyrian territory and
up to the Egyptian borders; then he ordered the attack. The Egyptian
cities fell quickly to the Assyrians and Esarhaddon drove the army
forward down the Nile Delta and captured the capital city of Memphis.
Although Tirhakah escaped, Esarhaddon captured his son, wife, family,
and most of the royal court and sent them, along with much of the
population of Memphis, back to Assyria. He then placed officials loyal
to him in key posts to govern his new territory [Lower Egypt] and returned to
Nineveh.
By the following year Tirhakah had retaken Memphis, and the local officials came over to his side. Esarhaddon mounted a return but died enroute, leaving it to his son, Ashurbanipal, to secure Egypt for the Assyrian empire.
Regarding the passage from Ezra, I am unable to confirm from extra-biblical sources whether Esarhaddon (681-669 BCE) resettled foreign people in Samaria specifically. Assyrian deportations into Samaria began around 709 BCE and are usually credited to kings Sargon II (721-705 BCE) and Sennacherib (705-681 BCE). The archeological evidence from Samaria, which is sparse, may connect resettled peoples to Mesopotamia, supporting at least that aspect of the biblical account (2 Kings 17:24). Since there is no discernible difference in the uncovered material culture in Samaria during the Assyrian and Persian periods, most scholars conclude any resettled people quickly assimilated into the dominant Israelite population (about 80% of which, by many estimates, had survived the Assyrian assaults and deportations). I find no suggestion in the literature that any resettled people in Samaria might have been from Egypt.
For further reference, Bob Becking includes a chapter on the so-called 'repopulation' of Samaria in his book, The Fall of Samaria: An Historical and Archaeological Study (Brill, 1992). He may offer more information.