Apple designs an iPhone, has it produced in China, sold to Apple HK, then sold to Germany.
Profit margin in China by Foxcon? Small Profit margin in the offshore jurisdiction (e.g. Hongkong). Big. Taxes in HK for this transaction: Zero
This transaction also does not show up in the US trade balance. ("Black matter in accounting")