There is a huge difference between investing in the productive capacity of a country, and dumping cheap/free goods.
If you look at countries that have successfully transitioned from 2nd/3rd world countries to 1st world economies, despite what "free market" boosters would have you think, nearly all of the started out with a huge amount of protectionism, so that domestic producers could improve their capacity without getting decimated by (initially) more advanced foreign competitors. South Korea is a great example of this, and of course China - while China is famous for its exports, China makes it notoriously difficult for foreign firms to compete in the country, often putting out the tantalizing notion of a huge market, but then stealing trade secrets and putting their thumb heavily on the scale in favor of domestic companies.
If you look at countries that have successfully transitioned from 2nd/3rd world countries to 1st world economies, despite what "free market" boosters would have you think, nearly all of the started out with a huge amount of protectionism, so that domestic producers could improve their capacity without getting decimated by (initially) more advanced foreign competitors. South Korea is a great example of this, and of course China - while China is famous for its exports, China makes it notoriously difficult for foreign firms to compete in the country, often putting out the tantalizing notion of a huge market, but then stealing trade secrets and putting their thumb heavily on the scale in favor of domestic companies.