In short
The news of Herod’s intention to kill Jesus would have surprised Joseph, since both he and the wise men had been told that Herod wanted to worship Jesus.
Yes, it would, for the Magi had just told him that Herod wanted to come to worship the child. When they were told in a dream not to return to Herod, they would have of course been suspicious concerning the king’s plan, but, so far as we know, even then nothing was known about the active, aggressive intentions of Herod. If they did, we could assume that the Magi would probably not have left the child and his mother to fend for themselves, even if Joseph possibly already considered leaving the village .1
13 Now when they had departed, behold, an angel of the Lord appeared to Joseph in a dream and said, “Rise, take the child and his mother, and flee to Egypt, and remain there until I tell you, for Herod is about to search for the child, to destroy him.”