U.S. factories are thriving thanks to unexpectedly strong demand for all kinds of goods, but that is also leading to unexpected headaches.