From what I understood this is not accurate. An iPhone built from China is recorded for the full value when shipped to US/Europe/etc. This makes it appear that there's a trade deficit while it's actually the opposite (controlled by Apple).
Europe works in a similar way when I looked at it (ages ago). There's various data collected (Eurostat). But for trade it's on value and it's not always clear who controls it, nor where it is headed.