There are a lot of factors that go into a bad decision made with good intentions. I don't, in general, assign negative or malevolent motives. People try and blunder more often than people are evil. I consider the separation of families in custody for asylum processing a blunder. I say no custody, release to Mexico (instead of US) with stipend during processing.
Except...
Obama detained families, albeit together, but was ordered by court to release them (hence "catch and release"....with electronic monitoring and a legal guide/resources). I would be surprised if Trump paid enough attention to know that, but people around him must have told him. Can I prove it? No. But with all the reports about him ignoring the advice of, well, everyone, I think it's a pretty damn reasonable inference.
He not only restarted the long detentions, but deliberately instated indefinite separations. They still haven't and probably will never get all the kids back with their parents. He did it after running in large part on castigating these people. And while I might have to go googling to 'prove' it, he said a number of things a number of times from which there's just about an inescapable inference that this plot was designed to create an issue to cudgel with, and perhaps a side wedge-issue to stir up trouble between people willing to vote for Ds but who are really concerned about illegal immigration.
I do not see it as trying and blundering. It smelled, no smells, callous, deliberate, and with the same seeming disregard for other conscious minds that he just about always displays.
That is, even if he thought it was "best for the country" to engage in such vile policymaking, he still did it.....and he must have been told it was already ruled out, and did it despite having at least a basic understanding of what it is to be a parent.
If someone thinks the best thing for the country is to act illegally and cruelly, I'm not going to grant them a "blunder" defense.