Robots’ infiltration of the workforce doesn’t happen gradually, at the pace of technology. It happens in surges, when companies are given strong incentives to tackle the difficult task of automation.

Typically, those incentives occur during recessions. Employers slash payrolls going into a downturn and, out of necessity, turn to software or machinery to take over the tasks once performed by their laid-off workers as business begins to recover.

As uncertainty soars, a shutdown drags on, and consumer confidence sputters, economists increasingly predict a recession this year or next. Whenever this long economic expansion ends, the robots will be ready. The human labor market is tight, with the unemployment rate at 3.9 percent, but there’s plenty of slack in the robot labor force.

This next wave of automation won’t just be sleek robotic arms on factory floors. It will be ordering kiosks, self-service apps and software smart enough to perfect schedules and cut down on the workers needed to cover a shift. Employers are already testing these systems. A recession will force them into the mainstream.

A new analysis from Mark Muro, Robert Maxim and Jacob Whiton of the Brookings Institution, a nonpartisan think tank, finds much of the nation will be susceptible to the upheaval caused by automation in coming decades, particularly young people, minorities and Rust Belt workers.

The total number of jobs will rise in the long run, but many workers will be forced to adapt. Robots will continue to roil the long-suffering manufacturing sector, Brookings finds. They will also move into low-skill service jobs such as food services workers once considered too cheap or too difficult to automate.

If it can be replaced by technology, it probably won’t recover from a recession

Economists generally focus on workers performing repetitive tasks, including rote mental or clerical work in an office cubicle and rote manual labor on a factory floor, to measure the influence of technology.

Middle-income work has evaporated in recent decades. Americans are now divided between the high-paid employees who design machines, the low-paid workers who sweeps up after it, or the even lower-paid service workers who serves fast-casual sandwiches to the other two.

In an upcoming paper from Review of Economics and Statistics, economists Nir Jaimovich of the University of Zurich and Henry Siu of the University of British Columbia found that 88 percent of job loss in routine occupations occurs within 12 months of a recession. In the 1990-1991, 2001 and 2008-2009 recessions, routine jobs accounted for “essentially all” of the jobs lost. They regained almost no ground during the subsequent recoveries.

Firms in cities hit hardest by the Great Recession raised their skill requirements for new employees and invested more in technology, according to economists Brad Hershbein of the W.E. Upjohn Institute for Employment Research and Lisa Kahn of the University of Rochester.

Their 2018 American Economic Review analysis of almost 100 million online postings collected by Burning Glass Technologies in 2007 and 2010-2015 found strong signs companies were replacing workers who performed routine tasks with a combination of technology and more skilled workers. The effect was especially pronounced for “cognitive” workers such as office clerks, office administrators and salespeople.

Robots are ready

The economy is near full employment — the point at which everyone who wants a job has one. The unemployment rate has been at or below 4.0 percent for 10 straight months.

But the labor market for robots has room to grow. As wages rise and human help gets pricey, companies have experimented with alternatives.

My colleague Peter Holley has tapped into a deep vein of corporate automation efforts in recent months. Cooler-sized robots deliver food for $1.99 at George Mason University. Tall, slim robot assistants patrol Giant supermarkets in search of spills and hazards. Walmart planned to install 360 floor-cleaning robot zambonis by the end of January. A start-up called Robomart hopes to start running mobile supermarkets in robotic minivans in the Boston area in partnership with Stop & Shop.

But while many businesses dabble, few have gone all-in — yet.

“While you begin to see more kiosks in Panera in the boom period,” Muro said, “the real urgency may occur for companies if there’s a recession in the next two to three years.”

The big players are lining up. Amazon reportedly plans to add as many as 3,000 cashierless stores by 2021 to augment its cashierless digital storefront. Sam’s Club and what Bloomberg calls a “fleet” of competitors are following suit.

(Amazon’s chief executive, Jeffrey P. Bezos, also owns The Washington Post.)

It may seem odd that automation progresses most rapidly during and after recessions, when unemployment is high and humans are cheap. But as Muro and Whiton point out, workers start looking much more expensive during recessions once you account for businesses’ declining revenue.

Because of the work they tend to do, young workers are most susceptible. They comprise 9 percent of the workforce but 29 percent of food-service workers. Men, who hold seven out of 10 production jobs, will likely face more upheaval than women.

Hispanic workers are more exposed than any other race or ethnic group, Brookings found. American Indians and black workers also face elevated risk of their job changing or vanishing due to technology.

The Rust Belt areas hammered by the Great Recession remain automation’s likeliest targets. Technology will shake up Toledo, Ohio, more than any other metro area in the country, Brookings found. Much of the rural South and Midwest will also face further transformation.

“There are lot of questions about how the next recession will work,” Muro said. “It could be a rough next episode.”