Capital investment are potential future negative outflows. They do not replace exports (goods and services). That is unless these investments are a scam (ahem), investors are probably expecting a yield in the future and to retrieve their investment. Movement of capital will be good if it was balanced, but it is not: https://en.wikipedia.org/wiki/Net_international_investment_p...
The US runs a NIIP of negative $27 Trillion. This is a consequence of the trade deficit as the deficit is being financed mainly with this money.