So if it was a prophecy for them to flee the land because King Herod wanting to kill baby Jesus, then it was God's fault for them fleeing as well as making sure the Magi men did not go back to king Herod that resulted in the death of children. So you can rightly blame God for this terrible act, in which case he was the cause of it all. How does one put a human life over the other?
Herod killed the children, and seemingly did so mostly to eliminate Jesus, but also out of spite. God did not kill the children. Unless you want to ascribe to God the fault of every human death ever, because he theoretically could have intervened to stop all of them, at least at a practical level. You can argue that if you want, but it doesn't leave you much ground to stand on as a theist if you do.
See you need to read the story again. There was no angel that warned them but God gave them a dream that showed them probably, why, they wouldn't want to go back to king Herod because of the warning of what could happen to them, if they did.
Unfortunately, you're adding to the text as well. Yes, the angel spoke to Joseph, not the magi. But, the text merely says that God warned the Magi not to return to Herod. There is no ambiguity, no hint that the Magi were at all in any doubt that God was speaking to them. Indeed, there is similarly no suggestion they did not return because they feared for their own well being - the word that 'warn' comes from is a word that gets used in wider Greek literature to refer to taking instruction from various divine oracles - there is no intrinsic suggestion that they did not return because of fear of physical harm, or out of any fear in general - rather they were simply told not to return.
Your loose paraphrasing is not reasonable, because what ever they saw in that dream prevented them from going back to king Herod. God might have struck them dead before that got a chance to tell, who knows, but they were afraid because they all had the same dream while they were sleeping (assuming they were sleeping verse given that they had a vision) but they must have talked among themselves about the dream when they decided not to go back tell the King.
We won't know what was in the vision, but there's no particular reason to read anything into it other than what the text suggest - they were given a message in a dream not to return to Herod. Having heard such instruction they did not go back to Herod. It's reasonable to assume they obeyed the instruction because they deemed it of divine origin - obviously, Matthew himself believed it was from God. You are adding to the text by suggesting they were fearful, that God threatened them, or that they had any kind of future 'glimpse' of what could happen if they returned (or for that matter, if they didn't). There is simply nothing in the text that suggests that.