Also not correct as Egypt was also part of the Roman Empire at the time.
I'm sure this is a poor analogy but let's say King Herod was the Governor of New Mexico and upon hearing that Herod was going to kill all the little boys, Joseph and Mary leave New Mexico and go to Texas. Texas and New Mexico are both part of the U.S.A. the same way Israel and Egypt were both part of the Roman Empire.
Oh, and why to the pols always confuse two quite separate events. Joseph and Mary came to Bethlehem to comply with the census, mandated by the Roman government. Joseph and Mary did not take Jesus to Egypt until after the visitation of the Three Wise Men, who warned the Holy Family of Herod's intent.
And they did not remain in Egypt in perpetuity to live on the government teat. They returned to Nazareth after Herods death.