The only exceptions is war machines (guns, ships...) - you need to have that in your country just in case. Though the more trade you do with others the more nobody wants war with you because they lose both the goods you make and the market for goods you buy from them.
If you can make guns and ships but not fuel for the ships and food for the people carrying the guns and manning the ships, how far does that get you?
If you can make guns and ships domestically, but rely on a foreign power that might become hostile for the raw material, how far does that get you?
If you take the “war materiel must be domestically producable for security” position, and think it through, you will find that it is by no means a narrow exception.
> Though the more trade you do with others the more nobody wants war with you because they lose both the goods you make and the market for goods you buy from them.
The idea that no one ever wants to go to war with a major trade partner is...hard to align with history.
There's open war, cold war, hegemon bullying, and lots of other conflicts. Look at how much China tried to sabotage the Australian economy this last year (and vice versa of course) even though China NEEDED Australian coal and resources for their industry. Political considerations in the short run has priorities, even if it's economically costly.
Besides, with more capital it's going to lead into cheaper manufacturing with automatization in higher labor countries. Sometimes it's better to have redundant factories in many different parts of the world. Even if it's only for innovation.
You may not sell as many with more expensive local manufacturing prices but the goods will be of a much higher quality and so more expensive.