Long before investors lost faith in the Chinese stock market, something seemed amiss at the ports of Long Beach and Los Angeles, where the stevedores and longshoremen process about 40% of U.S. trade with China.

Jock O’Connell, a trade adviser in California with 28 years of experience studying the docks, wasn’t seeing the patterns he would expect from a rapidly growing Chinese consumer class. The number of containers coming from China was continuing to grow, but beginning in 2013, fewer loads were being sent in the other direction.

...