Check your archeological and reputable history: Herod never killed babies. That was a myth. It has been proven, most recently here
Matthew's Nativity is charming and frightening... but it's a Jewish myth - Telegraph
There were a number of Jews who hated Herod, mainly and above all else because Herod was given the throne by Rome, a throne which by birth and blood, he had no right to according to jewish clerics and scholars of the time. So naturally, Jews were resentful towards Herod as in their eyes, he had no legitimate right to be the King.
Many stories were written about Herod after his death, and most all have been proven to be untrue, including the one about the slaughter of the innocents. Herod was so hated that jews went out and desecrated his grave after he died even. Making up hate stories was part of the anger and hatred that Jews had towards him. Certainly, fabricating a story about slaughtering innocent infants would be a great way for Post - Herod Jewish writers to immortalize the infamy and hateful nature of this king. What a great way to vent anger onto King Herod.
Now as the above mentioned article states , Herod was
Capable of such activities, but again, much of the history about Herod comes from Jewish Clerics and scribes who had an "Anti-Herod" agenda.
So we must keep in mind the source of this myth, which is basically unique to Mathew's Gospel which we know is all myth.
Most important though is the mythic story of having the hero, in this case Jesus, following a path that parrallels an old testament story of Moses (a fictional character BTW) and in Jesus' case, he is rescued by a Pharoah.
Well, Christianity borrows heavily, remember, from Egyptian Mythology, so why wouldn't a pharaoh arise as the great rescuer here?
And since Rome appears as the antagonist to Jesus' mythic journey, Herod thus has to be aligned with Rome in order for Jesus to "cross the threshold" in the mythic journey.
Bottom line is, like most things in the Bible, it never happened.