In economics, the law of diminishing returns describes the shrinking benefits associated with additional capital expenditures. Beyond some point, the disadvantages of increasing your investment start to outweigh the advantages. Alas, there is a political corollary to this concept that the White House has been ignoring but maybe shouldn’t.

We all agree that illegal immigration was the defining issue of Donald Trump’s presidential campaign. At rally after rally, he promised his supporters that he would construct a “beautiful” wall along the southern border and make Mexico pay for it. Mr. Trump is convinced that his hard-line stance is a big reason he won, and there’s a case to be made that immigration played a larger role in 2016 than in any presidential race in recent memory.

For decades, conventional wisdom held that immigration restrictionism was a political loser. People might like to complain about the undocumented population, but exit polling showed that they ultimately voted on other issues. This included Republicans, who repeatedly rewarded pro-immigration candidates in national elections. Ronald Reagan spoke dismissively of “the illegal alien fuss” and wanted to “make the border something other than a locale for a 9-foot fence.” He quipped that Hispanics are “Republicans who don’t know it yet.”

George W. Bush—first as governor of Texas and later as president—channeled Reagan’s big-tent Republicanism and worked to portray the GOP as racially and ethnically inclusive. In 2004 he won more than 40% of the Hispanic vote en route to a second term. Even GOP presidential hopefuls since who were nominated but lost, such as John McCain and Mitt Romney, were well to the left of Mr. Trump on how to handle immigration and border security.

Mr. Trump, by contrast, has attempted to make illegal immigration a wedge issue on par with abortion and guns. Some of his supporters care about little else, and the president has gone to great lengths to ensure that their concerns are heard. Putting aside the merits of placing additional physical barricades on the border, the question now facing the administration as another government shutdown looms is whether the political capital being invested in this issue is still producing positive returns for the president. Or has his wall rhetoric become counterproductive?

The first signs of trouble for the White House were the midterm elections. Mr. Trump made border security a dominant theme, yet Republicans lost 40 seats and control of the House. Last November, public opposition to a new border wall stood at 59%, according to a CBS News poll. Today, it’s 60%, according to a Gallup survey released earlier this month. Given how hard the president has worked over the past two months to make the case for a wall, it’s remarkable how few minds he has changed.

In December Mr. Trump shut down the government to stress the importance of border security. During negotiations, he gave a national address from the Oval Office that graphically detailed violent crimes committed by people in the country unlawfully. The State of the Union speech was another attempt by Mr. Trump to sell the country on a wall. Yet and still, the Washington Examiner reported last week that “the nation is getting in line behind Democrats in their fight with President Trump over a border wall and amnesty.” Citing the recent Gallup poll, the paper said “the bottom line is that Democrats, and not the president, have the edge in the immigration debate.” Either voters have tuned out the president on border security or they find his arguments unpersuasive. In any case, an issue that helped elect the president may now be helping his opponents.

If the president cuts a deal with Democrats for less than he’s asking, his mainstream media antagonists will mock him while his supporters on talk radio and cable news will carp. But he’ll be doing his party a favor and his base will stand by him, no matter what Rush Limbaugh and Ann Coulter say.

Mr. Trump promised to be a deal-maker, not a conviction politician. What matters most to his core supporters is what he symbolizes—what he represents—not the purity of his policy accomplishments. Trump loyalists understand that Congress is a coequal branch of government and that the votes to fund a big, beautiful wall simply aren’t there. They may understand this better than the president himself does.

Congressional leaders struck a tentative deal this week that would provide $1.38 billion for more physical barriers on the border, far less than the $5.7 billion the president has been seeking. Mr. Trump must decide whether to declare a minor victory and move on for now or double-down on a strategy that by all appearances is producing diminishing political returns for him and his party.