Reports that Donald Trump has surrendered in the latest showdown with Congress over funding for a border wall will shock no one. Like Yosemite Sam in the face of Bugs Bunny, Trump has fired in all directions and thrown tantrums and gotten outplayed. It’s the usual. This time, it was also inevitable. Government shutdowns can be great as brinkmanship, but your cause must be on the side of prevailing voter opinion. Chuck Schumer folded swiftly last January, when Democrats found that shutting down the government over Republicans’ refusal to grant citizenship to DACA recipients polled poorly with the public. The math here was equally plain. When only about 35 percent of Americans are in favor of constructing a wall on the border, you’re already in the hole and going deeper by throwing down ultimatums.

We now know there will be no wall, just as we’ve long known there would be no Trumpism—meaning a working-class-oriented Republicanism offering more self-contained policies on trade, immigration, and defense. Trump could still achieve some breakthroughs on trade, and North Korean peace would be Nobel-worthy, but no one would be surprised if these efforts, too, petered out into the status quo or, God forbid, exploded into something worse. In any case, the wall deserves a postmortem. It was Trump’s baby. It was why he won the Republican nomination. So it’s time for a cold-eyed review of why it perished.

Put aside normative considerations and view the fights over immigration, always a treacherous issue, in tactical terms. Here are the obstacles anyone in Trump’s position would have to take into account:

1. Only about half of House Republicans support Trump’s immigration policies with any enthusiasm.

2. All Democrats oppose Trump’s immigration policies.

3. Paul Ryan opposes Trump’s immigration policies. He would be happier with Democrats setting immigration policy than with Republicans setting it.

4. The Chamber of Commerce opposes Trump’s immigration policies. It wants high levels of immigration and low levels of enforcement.

5. Nearly all of business, philanthropy, academia, and the press is in favor of immigration amnesty (meaning legalization of those here illegally) and opposed to new immigration restrictions (meaning tougher enforcement or reduced numbers).

6. Only about a third of Americans, as mentioned above, support the wall.

On the other hand, on day one in the White House, Trump had the following things working for him:

1. He had control of DACA, Obama’s executive order.

2. He held the key to what House Republicans like Ryan wanted most: tax cuts and the repeal of Obamacare.

3. He had some wedge issues that went in his favor. Most Democratic officeholders oppose making E-Verify mandatory when hiring, while over 80 percent of Americans favor it. Most Democratic officeholders reject any cuts to legal immigration, while over three quarters of Americans would prefer lower levels.

4. Republicans must voice support for strong borders.

5. Trump was willing to defy G.O.P. orthodoxies.

These weren’t perfect cards, but they weren’t hopeless, either. In vowing to discontinue DACA protections, Trump had the power to draw Democrats to the negotiating table even before he stepped into the White House. In campaigning on a willingness to break with G.O.P. orthodoxies, Trump could have proposed offbeat ideas to entice Democrats, like pairing funding for the wall with a major bump in the minimum wage, as the writer Mickey Kaus has proposed, or backing Chuck Schumer’s infrastructure proposal if it included a national E-Verify rollout. (Even in its own right, E-Verify is popular enough to force its opponents into a defensive crouch, as the Manhattan Institute’s Heather Mac Donald has suggested.) Paul Ryan’s desperation to get tax cuts could have been made conditional upon Ryan’s support in pushing through Trump’s immigration policies. Fear of Trump’s base meant that Trump could get a lot of Republicans to line up behind an immigration bill, regardless of whether they liked it. (Despite negligible White House backing and tacit opposition from Paul Ryan, a relatively hawkish House bill from Virginia Republican Bob Goodlatte that would have legalized most DACA recipients—in exchange for wall funding, an end to “chain migration,” and a rollout of E-Verify—managed to get 193 Republican votes in the House.)