In the 1950s, the great neoconservative intellectual Irving Kristol acknowledged Joe McCarthy’s stark failings, but famously refused to take the side of his critics. “For there is one thing,” he wrote, “that the American people know about Senator McCarthy: He, like them, is unequivocally anti-Communist. About the spokesman for American liberalism, they feel they know no such thing.”

The sentiment could equally apply to President Trump and the issue of immigration.

Trump’s team is still trying to figure out how to extricate itself from a policy of separating families at the border that was incompetently executed, incompetently explained and incompetently reversed.

The president himself is so heedless of his own priorities and legislative strategy that he initially opposed a compromise House immigration bill crafted with the input of his own staff, then reversed himself and supported it, then declared it should be put off until next year. Who knows what he’ll say about it next?

He poured contempt on the idea of adding immigration judges at the border, when it is rock-solid Ted Cruz who is proposing the idea and every immigration restrictionist welcomes it as a way to expedite the consideration of asylum claims. (The current backlog of 600,000 cases is a disgrace and adds to the dysfunction of the system.)

Trump talks of immigrants in the crudest terms (they are infesting or invading), and portrays them as budding violent criminals. Illegal immigrants routinely violate the law to come, stay and work in the United States, but the overwhelming majority simply want a job.

Yet, with apologies to Irving Kristol, the one thing the American people know about Donald Trump is that he believes we have a border and it should be enforced. About his opponents, they know no such thing — and how could they?

Trump almost certainly hurt himself over the past two weeks, but the damage shouldn’t be exaggerated or the opportunity for recovery minimized (assuming that migrants kids can be returned to their parents expeditiously, despite the insane legal and bureaucratic obstacles).

In signing his executive order reversing course on family separations last week, Trump flipped from representing a splinter view to associating his opposition with one. Family separations were unpopular — less than a third of people supported them.

But even fewer people support so-called catch-and-release, permitting migrants to enter the country pending a court date. In a CBS News poll, only 21 percent say they want to temporarily release families into the country. An Economist/YouGov poll found that 19 percent favor release.

With Democrats now banging on Trump for wanting to detain families together, they represent the minority view. The public wants migrants to be treated humanely, but it doesn’t them to walk into the country. Of the various options that the CBS News poll gave people for dealing with migrants, the one that had the most support by far — 48 percent — was returning families home together.

The Democrats are ill equipped to take this on board, since the party is as hostile to immigration enforcement as it has ever been, and getting more so. The hot new cause on the left is calling for abolishing ICE, as allegedly (to quote New York progressive Zephyr Teachout) a tool “of arbitrary power and cruelty” and “unconstitutional illegal behavior.”

At a time when Democrats should be cognizant of their vulnerabilities on immigration, many of them consider US immigration authorities the interlopers rather than illegal aliens.

This is the opening for Trump. He’s always benefited from his opponents going too far, in part under the pressure of his provocations. If he can make it clear that he wants to deal with migrants at the border decently but firmly and that his opposition favors rules and limited-detention space that effectively mandate catch-and-release, he’ll be in the stronger political position, again.

On immigration, his advantage is the one thing that the public knows about him.