All sounds like history as I've read it.
Just saying, if we dont come up with enough
sense of national identity that overrides the
tribalism, things are not going to get better.
An attack by outer space monsters might
do the trick.
Well, if we can come up with something that's workable and consistent, it might help. Part of the trouble is that society seems to have a split personality on this issue. On the one hand, there are those who want a world without borders, free trade, globalism, etc., where national identity and sovereignty would become a relic of the past. But then there are the flag-wavers who embrace patriotism, American Exceptionalism, Manifest Destiny, etc.
Xenophobia is generally frowned upon, except when it comes to the Russians, at which point xenophobia is expected. We routinely apply inconsistent sets of rules depending on the situation.