The trade war is nearing a possible truce, but global companies are nevertheless moving to reduce their dependence on Chinese factories to make the world’s goods.