By David Wethe, Bloomberg News

The robot on an oil drillship in the Gulf of Mexico made it easier for Mark Rodgers to do his job stringing together heavy, dirty pipes. It could also be a reason he’s not working there today.

The Iron Roughneck, made by National Oilwell Varco Inc., automates the repetitive and dangerous task of connecting hundreds of segments of drill pipe as they’re shoved through miles of ocean water and oil-bearing rock. The machine has also cut to two from three the need for roustabouts, estimates Rodgers, who took a job repairing appliances after being laid off from Transocean Ltd.

“I’d love to go back offshore,” he says.

The odds are against him. As the global oil industry begins to climb out of a collapse that took 440,000 jobs, anywhere from a third to half may never come back. A combination of more efficient drilling rigs and increased automation is reducing the need for field hands.

And therein lies a warning to President Donald Trump, who has predicted a flood of new energy-sector jobs under his watch.

Automation, of course, has revolutionized many industries, from auto manufacturing to food and clothing makers. Energy companies, which rely on large, complex equipment for drilling and maintaining oil wells, are particularly well-positioned to benefit, says Dennis Yang, chief executive officer of Udemy, a company in San Francisco that trains workers whose careers were derailed by advanced machinery.

“It used to be you had a toolbox full of wrenches and tubing benders,” says Donald McLain, chairman of the industrial-programs department at Victoria College in south Texas. “Now your main tool is a laptop.” McLain, who worked as a rig hand for 25 years, is helping to retrain laid-off oil workers for more technical jobs.

During the boom, companies were too busy pumping oil and gas to worry about head count, says James West, an analyst at investment bank Evercore ISI: “We got fat and bloated.” He says the 2 1/2-year downturn gave executives time to rethink the mix of human labor and automated machinery in the oil fields.

Still, in the current political climate, they’re proceeding cautiously. More robotic drilling ultimately means lower labor costs and fewer workers near some of the most dangerous tasks. But oil companies probably will frame their cost-cutting technologies simply as a way to be more competitive around the world, says West.

“They’ll more likely brag about the automation rather than these head counts,” West says. “It’s kind of dangerous to talk about jobs in the Trump administration.”

Yet Trump is seen as the great hope for more shale-job creation than ever before, says Jay Colquitt, founder of OilfieldTrash.com, an online news portal catering to oilfield workers. As more federal lands open up for drilling, the jobs will follow, he adds.

“Even though modern technology is great, you can’t eliminate the person,” says Rodgers. “To make sure it never fails, you’ve got to have somebody there watching it, to verify it.”

The industry is acutely aware of the heavy reliance on manpower, after the world’s four largest oil-service companies spent $3.12 billion in severance costs during the past two years, says Art Soucy, president of global products and technology for Baker Hughes.

Rigs have gotten so much more efficient that the shale industry can use about half as many as it did at the height of the boom in 2014 to suck the same amount of oil out of the ground, says Angie Sedita, an analyst at UBS Corp. Nabors Industries, the world’s largest onshore driller, says it expects to cut the number of workers at each well site eventually to about five from 20 by deploying more automated drilling rigs.

The impact of technology extends well beyond the wellhead. Automation-related jobs for software specialists and data technicians are in demand as the oil industry recovers, said Janette Marx, chief operating officer of Airswift, an oilfield recruiter. She sees explorers and service companies being much more methodical and selective in their hiring this time around.

“To me, it’s not just about automating the rig, it’s about automating everything upstream of the rig,” says Ahmed Hashmi, head of upstream technology for BP Plc. “The biggest thing will be the systems.”

That means an engineer can design an oil well at his desk. With the press of a button, an automated system would identify the equipment needed from a supplier, create a 3D model and send instructions for building it out into the field, Hashmi says. “That is automation.”