The US economy did great prior to 1900 or so. During this period, we did not have significant military action outside of the Americas, and we avoided peacetime alliances. From 1820-1900 the US economy exploded from about 40% the size of the UK economy to about 200% the size of the UK economy.
https://ourworldindata.org/grapher/gdp-maddison-project-data...
Switzerland has a per capita GDP exceeding the US while pursuing isolationist foreign policy. They are the world's most popular country in opinion polls.