Being able to see into the future - slaughter of infants - was not part of their skill set, so to speak, and is not related to intelligence. Hindsight can be 20/20, but most people don't have 20/20 foresight. You are looking at the situation with hindsight.
God works in mysterious ways. Why did He choose Peter who denied Him three times to be his first Pope or Judas who would betray Him? It is all part of God's plan, but that does not mean that we can fully comprehend His plan.
OK, didn't get that the first few times around.
But they were "wise men." And if you see another post I made here, you'll see my argument about why anyone with any sense would have known better than to taunt Herod with the news of a rival king's birth.
As for it "all being part of God's plan," well, that's not an explanation. That's like saying the sky is blue because it is blue.
I don't fault your answer, because it's not an easy question - I've certainly never heard it asked - and it's a challenge to the conventional wisdom and the popular tradition. But I think it's a good, honest question, even if there is no other answer than, "because."