Its odd you go for Germany, one of the youngest major nation states, as an example in your reply. Germany did not exist until 1871. German continental expansionism was responsible for the Franco-Prussian War and the two World Wars that followed. It could be said that Germany was a unique and immature nation state with exceptional military power until at least 1945 and is therefore very atypical.In the history of the world there certainly hasn't been many wars, except for the last 6000+ years that we can recollect. Just a recent example, there have been 9 wars between France and Germany since 1701, that averages to a war every 35 years. You think that's not many? The creation of the EEC in 1957 and the EU in 1993 has led to the longest period of prosperity and peace between these 2 nations. You think the union had nothing to do with it?
Of course, integration doesn't eliminate the risk of war, it just creates additional considerations not to fight one. The US Civil War killed more Americans than any other wars it fought, but America is stronger today as a nation than if it was split. In fact, the US is strong because 50 disparate states formed a union, it's strong because of its population diversity, despite what white supremacists want us to believe.
The fundamental problem with nationalism is its never-ending quest for purity. Kick out the obvious different ones, then those affiliated with the different ones, then those who question the system, then anyone who doesn't swear allegiance to the system... it's a nightmare scenario we have already experienced many, many times in our 6000+ years history of wars of domination by one defined group against other defined groups. It still drives most of our wars today.
Without a doubt, massive immigration into the US allowed the country to harvest its natural resources and develop its economy far faster than nation state that were dependent on internal population growth and who distrusted mass immigration. But you seem to hold up the 50 US states as each being a putative nation state within its own right: this would have made it a patch-work of minor states like pre-1871 Germany or pre-1861 Italy. There is nothing in US history that suggests this was ever possible, practicable or desired.
But you can't hold up the most powerful nation state as an example of how bad nation states can be. With its incredibly diverse population you also can't use the US as an example of the evils of seeking purity.
Seems like you want to have it both ways - "Nation states, bad!", but also "US nation state, good!".