Washington — Trying to keep up with customer demand, Batesville Tool & Die began seeking 70 people to hire last year. It wasn’t easy. Attracting factory workers to a community of 7,300 in the Indiana countryside was a tough sell, especially having to compete with big-name manufacturers nearby like Honda and Cummins Engine. Job seekers were scarce. “You could count on one hand how many people in the town were unemployed,” said Jody Fledderman, the CEO. “It was just crazy.” Batesville Tool & Die managed to fill just 40 of its vacancies. Enter the robots. The company invested in machines that could mimic human workers and in vision systems, which helped its robots “see” what they were doing. The Batesville experience has been replicated countlessly across the United States the past couple of years. Worker shortages have led many companies to invest in machines. They’ve also been training the workers they do have to use advanced technology so they can produce more with less. The result has been an unexpected productivity boom, which helps explain a great economic mystery: How has the world’s largest economy stayed so healthy, with brisk growth and low unemployment, despite brutally high interest rates that are intended to tame inflation but that typically cause a recession? To economists, strong productivity growth provides an almost magical elixir. When companies roll out more efficient technology, their workers can become more productive: They increase their output per hour. A result is that companies can often boost profits and raise pay without having to jack up prices. Inflation can remain in check. The Fed’s aggressive streak of rate hikes — 11 of them starting in March 2022 — managed to bring inflation from a four-decade high of 9.1% to 3.1%. But, to the surprise to the economists who’d forecast a recession, the higher borrowing costs have caused little economic hardship. Perhaps the likeliest explanation is the greater efficiencies that companies like Batesville Tool & Die have managed to achieve. Before productivity began its resurgent growth last year, a rule of thumb was that average hourly pay could rise no more than 3.5% annually for inflation to stay within the Fed’s 2% target. That would mean that today’s roughly 4% average annual pay growth would have to shrink. Higher productivity means there’s now more leeway for wage growth to stay elevated without igniting inflation. The productivity boom marks a shift from the pre-pandemic years, when annual productivity growth averaged a tepid 1.5%. Everything changed as the economy rocketed out of the 2020 pandemic recession with unexpected vigor, and businesses struggled to re-hire the many workers they had shed. The resulting worker shortage sent wages surging. Inflation jumped, too, as factories and ports buckled under the strain of rising consumer orders. Desperate, many companies turned to automation. The efficiency payoff began to arrive almost a year ago. Labor productivity rose at a 3.6% annual pace from last April through June, 4.9% from July through September and 3.2% from October through December. At Reata Engineering & Machine Works, “efficiency was kind of forced on us,” CEO Grady Cope said. With the job market roaring, the company, based in Englewood, Colorado, couldn’t hire fast enough. Meantime, its customers were starting to balk at paying higher prices. So Reata installed robots and other technology. Software allowed it to automate the delivery of price quotes to customers. That process used to require two weeks. Now, it can be done in 24 hours. Many economists and business people say they’re hopeful that the productivity boom can continue. Artificial intelligence, they note, is only beginning to penetrate factory floors, warehouses, stores and offices and could accelerate efficiency gains. Automation raises fears that machines will replace human workers, killing jobs. Some workers supplanted by robots do often struggle to find new work and end up settling for lower pay. Yet history suggests that in the long run, technological improvements actually create more jobs than they destroy. People are needed to build, upgrade, repair and operate sophisticated machines. Some displaced workers are trained to shift into such jobs. And that transition is likely to be eased this time by the retirement of the vast baby boom generation, which is causing labor shortages. Some of today’s productivity gains may be coming not just from advanced technology but also from more satisfied workers. The tight labor markets of the past three years allowed Americans to change jobs and find others that pay better and make them happier and more productive. Justin Thompson, of Kalamazoo, Michigan, felt burned out by his job as a police officer, with its 16-hour workdays .”I was literally running myself into the ground,” he said. Thompson’s wife saw a job posting for operations manager at a charter airline. Even without airline experience, his wife felt he could use skills he gains as a Marine Corps infantryman — handling logistics for missions — during tours in Iraq and Afghanistan. She was right. Omni Air International hired him in 2019. Thompson, 43, loves the new job, which allows him to work from home when he’s not traveling. And his Marine experience — which included developing ways to improve efficiency — has proved invaluable. Other workers have switched from low-skill jobs to those that allow them to be more productive. At Reata Engineering, staffers were trained to use new sophisticated equipment. “The whole point is not to lay people off,” said Cope, the CEO of Reata Engineering. “The point is to make people do jobs that are more interesting” — and pay better, too.