I was going to say similar on both points. I doubt there are people knowledgeable/qualified about UN/NATO functions here on HN compared to a debate about something like NoSQL/SQL.
Given that, I like the tone of OP's point - why can't the UN members (which is all countries right?) come together and just establish a list of sovereign countries and their borders and then humanity can be done with invasions? I realize there would be some tough conversations, maybe intractable regarding Taiwan, possibly other areas as well. Start the conversation though. Move humanity from focusing on military pacts to economic/aid pacts and focus on human rights.