Julie Mockbee, of Walton, Ky., is one of many Americans who got burned by global trade, losing her job of 20 years when auto parts maker Johnson Controls Inc. moved production to Mexico in 2013.

Ms. Mockbee used federal funds to get retrained, earning an associate degree in mechatronics, a field focused on programming robots.

Now 56, she’s landed a job at ATech Training Inc. where she hand assembles machines used to train auto mechanics and earns about $10 less an hour than she did in her old job.

The retraining problem is a key component of U.S. frustrations with global trade. Policy makers and economists knew that some workers would be dislocated by imports from other countries when the U.S. pursued expanded trade with Mexico, China and others in the 1990s.

The solution was retraining programs meant to help workers build skills in new industries. But retraining didn’t deliver as planned—workers didn’t move to where new jobs developed, fell behind while they were in school or simply found the mountain of developing new skills in middle age too tall to climb.