As FedEx Corp. and UPS Inc. beef up automation to keep pace with surging e-commerce and a potential threat from Amazon.com, they’ve been stumped at a crucial stage: loading and unloading trucks. Robot ...