He made do with his new machines, although he could not make the exact screws Apple wanted. His company delivered 28,000 screws over 22 trips. Mr. Melo often made the one-hour drive himself in his Lexus sedan.

A former Apple manager who spoke on the condition of anonymity said the Flextronics team had also been far smaller than what he typically found on similar Apple projects in China. It was unclear exactly why the project was understaffed, the manager said, speculating that it was because American workers were more expensive.

The manager said similar Apple jobs in China would include a roomful of people working to ensure that all materials were in place for production. In Texas, it was one worker, who often seemed overwhelmed, the manager said. As a result, materials were regularly out of place or late, contributing to delays.

Another frustration with manufacturing in Texas: American workers won’t work around the clock. Chinese factories have shifts working at all hours, if necessary, and workers are sometimes even roused from their sleep to meet production goals. That was not an option in Texas.

“China is not just cheap. It’s a place where, because it’s an authoritarian government, you can marshal 100,000 people to work all night for you,” said Susan Helper, an economics professor at Case Western Reserve University in Cleveland and the former chief economist at the Commerce Department. “That has become an essential part of the product-rollout strategy.”

Ms. Helper said Apple could make more products in the United States if it invested significant time and money and relied more on robotics and specialized engineers instead of large numbers of low-wage line workers. She said government and industry would also need to improve job training and promote the development of a supply-chain infrastructure.

But, she added, there is a low chance of all that happening.

Apple still assembles Mac Pros at the factory on the outskirts of Austin, in part because it has already invested in complicated and custom machines. But the Mac Pro has been a slow seller, and Apple has not updated it since its introduction in 2013.

In December, Apple announced that it would add up to 15,000 workers in Austin, just miles from the Mac Pro plant. None of the new jobs are expected to be in manufacturing.