ZHONGSHAN, China—Thirty years ago, Levi Strauss & Co. began producing its iconic jeans in China, eager to tap a seemingly endless stream of workers willing to sew for a few dimes an hour. Now that stream is starting to dry up.

Over...