Frustrated that his administration's border control measures are not working, President Donald Trump has been musing lately about the kinds of tactics he thinks would really get results.

On a recent trip to Texas, he said that American troops deployed to the border could get "a little rough" with migrants but that "everybody would go crazy" if they did. Border Patrol agents who "get cute" and "get tough" with those in their custody would face arrest, he grumbled this week.

"When you do all of these things that we have to do, they end up arresting Border Patrol people," Trump told Fox Business Network.

Again and again, the president has urged more "toughness" at the border to deter the Central American families arriving in unprecedented numbers. To keep people out of the country, Trump favors physical measures and the threat of force: a wall, the deployment of armed U.S. troops, the separation of families and the possibility of closing the border entirely.

The problem with this view of border enforcement, current and former officials say, is that it won't work. The measures that could actually deter migration are less bruising and physically obvious, veering off instead into a world that is legal, technical and bureaucratic - and could take months or years to show results.

Central American parents and children are coming in record numbers because the U.S. asylum system is dysfunctional, immigration courts are crippled by an 860,000-case backlog and federal courts have blocked the government from keeping children in custody for longer than 20 days. Migrants know that the strain on the system means they are likely to be hastily released into the United States and could stay for years as they await court hearings.

Trump needs legislative and technical remedies to patch these "loopholes," experts say, and there are clear legal and moral obstacles to the use of physical force for a migration wave consisting mostly of families and children.

"Despite all the things the administration has done - send the military, separate families, the 'Remain in Mexico' plan - the numbers are going up, not down," said David Lapan, a former Trump administration official who worked under John Kelly when Kelly ran the Department of Homeland Security.

"Sending troops to the border doesn't fix flaws in the system, and it doesn't do anything to address the pull factors that are causing people to leave Central America and come here in the first place," said Lapan, who served 34 years in the U.S. Marine Corps and is now with the Bipartisan Policy Center in Washington.

Trump's pinings for physical toughness were further belied in recent days by a White House request for $4.5 billion in supplemental border funding, most of which would cover the costs of the long-term care of migrant children who arrive at the border without parents. The White House also began resorting to technical deterrents, ordering changes to tighten the asylum system, including moving to charge fees for the first time to those applying for humanitarian refuge.

Trump often describes himself, and others he admires, in terms of "tough" or "strong," and he ridicules adversaries as "weak." His recent purge of DHS leadership, including the removal of Kirstjen Nielsen as secretary, came as the result of a desire to move in a "tougher direction" on immigration, he said, without indicating at the time what that might entail.

Stephen Miller, Trump's top immigration adviser, pushes Trump to project strength at the border, and Miller has questioned the mettle of DHS officials he views as insufficiently gung-ho.

"Tough" often has meant doing things that Homeland Security officials thought were illegal or impossible, current and former administration officials said. Trump has not delved deeply into the details of what he wants the agency to do - but he has seen moves such as closing the border as looking externally "tough."

The surge in migration numbers has frustrated him, officials say, because he chafes at images of migrants crossing the border into the United States unmolested and scenes of U.S. border agents providing care and comfort to migrant families.

When Nielsen prepared to give a news conference at the White House last year in defense of the administration's "zero tolerance" family separations, Trump told her to "go out there and be tough, honey," according to people who heard the comments.

He later told aides that Nielsen was tougher than he expected and that he was proud of her. But he regularly questioned whether she was tough enough on immigration, according to current and former aides who spoke on the condition of anonymity to describe the president's behavior to reporters.

Trump has scoffed at border experts' endorsements of the use of drones and sensors to improve security, insisting that he wants a "powerful wall" guarded by troops and miles of concertina wire.

There are few tough immigration proposals that Trump has seen as too draconian, aides say. Some White House aides have used legal objections to attenuate his harshest impulses.

One administration official described Trump's longing for a more physical response as an understandable reaction from a president infuriated at the arrival of more than 100,000 migrants per month. The official called it a "lawless extended invasion" that federal courts and Democratic lawmakers do not regard as a threat.

"In any other civilization, a million people a year flooding into your country would be taken seriously, and you would use every means necessary within the bounds of humanity and dignity to stop that, but we don't," said the official, speaking on the condition of anonymity to share candid views. "We're constrained, and I think what he was saying is if you had troops doing some of these things, maybe there wouldn't be an invasion. It's incredibly frustrating to a large percentage of the population, and it's incredibly frustrating to the president's base."

Trump said in recent days that migrants view the border as if it were "Disneyland," and he described it as a place where tough-looking criminals are filing fake asylum claims to game the U.S. immigration system.

"These rough gang members come up and they stand there like little innocent lambs next to a lawyer that they have who they just pick up," Trump told Fox's Maria Bartiromo. "Then you look at the guy and you wouldn't want to fight him. OK?"

"This guy's not afraid of anything," Trump said.

During his first year in office, Trump's tough rhetoric seemed to work. He issued a barrage of enforcement policies and gave immigration enforcement agents more latitude to make arrests. Border apprehensions, the principal metric to gauge migration flows, slumped to their lowest levels in half a century.

But smugglers quickly realized that the tough talk on immigration had no teeth. The level of unauthorized migration began climbing in mid-2017, and in March, authorities took more than 103,000 migrants into custody along the border with Mexico, a 12-year high.

The nature of the migration has changed dramatically as well, shifting from mostly single Mexican men seeking seasonal jobs to Central American families fleeing poverty, despair and endemic violence. Parents bringing children now comprise 60 percent of arrivals, more than ever before, and Border Patrol stations are so clogged that agents are releasing families directly into the U.S. interior instead of first sending them to detention.

Cecilia Muñoz, director of the White House Domestic Policy Council under President Barack Obama, said smugglers are capitalizing on the lack of a consistent U.S. border policy.

"There's no evidence that even the most punitive things that this administration can think of have been effective," she said. "All the twists and turns the administration is taking . . . help the smugglers. Every time he says a thing, it gives the smugglers time to say, 'See, it's going to change. You better come now.' "

"All of the stops and starts and casting about for solutions by the administration just have been reinforcing the patterns and contributing to the problem," she added. "By creating chaos, the administration is creating excellent conditions for the smugglers to exploit."

Muñoz noted that the White House has been considering a new iteration of family separation to appease Trump's desire for harsh treatment, a program called "binary choice," giving detained parents the option of remaining in custody with their children or releasing them to another relative or guardian. She said the plan and others are nonstarters that will lead the administration into more legal fights.

Gil Kerlikowske, CBP commissioner from 2014 to 2017 under the Obama administration, said the Trump administration's physical symbols of toughness - such as razor wire - might excite Trump's political base but are likely to have little effect on border crossings.

Instead, he said, detaining migrants, deciding their cases and deporting them would send a stronger signal that crossing into the country illegally will fail.

That approach had had a "chilling effect" on crossings in 2015 after a surge of unaccompanied minors the previous year, Kerlikowske said. But he said the White House must pair enforcement with increased foreign aid to alleviate the poverty and violence the migrants are fleeing.

"You can't be any tougher on the border than what these people are facing at home," he said. "So if you made things better at home economically, educationally, with safety and security, then that's better."

Too often, Kerlikowske said, the White House's immigration policies are poorly thought out and even more poorly executed.

"Given the numbers, you're looking at two full years of failed policy," Kerlikowske said. "If your goal is to reduce the numbers."

Lapan, the former DHS official, said the biggest rhetorical disconnection is between the president's tough border talk and calls for Congress to act.

“It has been almost a mantra that Congress needs to change the laws, yet look how little the administration is doing to make that reality,” he said. “This administration had two years of a Republican-controlled Congress, yet they couldn’t get the changes in the law they desired. You have to find a way to work with Democrats. Otherwise you will never succeed, because all of these other measures aren’t reducing the flows.”