Here's a sticky one. What (if any) situation justifies an invasion?
There can be absolutely no justification for sending your army over the border of another nation before they have done the same to you either directly or though some other existential threat scenario such as your last option.
1. Your neighbor completely falls apart. Humanitarian crisis incoming on your soil. Let refugees in, intervene to secure the situation, or machine guns at the border?
A nation has as its sole and primary duty and purpose in existence to protect the security and welfare of its citizens. Foreigners are only to be considered in so far as that consideration is necessary to provide for those tasks.
For example you won't let people murder tourists in your country because tourist bring your country money thus benefiting your citizens and because you don't want foreigners murdering your citizens when they travel abroad. You'll protect foreign financial interests because you want other nations to do the same to yours. Etc.
But other than that reciprocity a country owes nothing to foreign citizens. Helping out of the goodness of ones heart should be reserved to non government entities, charities and other organizations whose job it is to do that.
So put machineguns on the border, barbed wire too. And only allow those foreigners in whose entry would benefit your economy and nation. The rest can deal with their own problems on their own.
2. Pre emptive strike. And the threat is actually real not some Nazi/Russian/Gulf of Tonkin false flag attack. The enemy is mobilizing, you can see their military columns approaching, their airwaves are talking up you as a threat and they've sealed the borders or closed a shipping strait.
What you describe is not a preemptive strike. A preemptive strike is by definition an attack against an enemy that you think has plans to attack you but has not yet put them into motion. Hence preemptive.
If the enemy is on their way the war is already on. And that is just just a regular attack.
3. A government directly or indirectly is responsible for an attack on your soil by a non state actor. Indirectly means they didn't order it but are knowingly harboring or aiding said group.
If it is a direct attack either by their military or by non state actors they fund or directly support than that should just be treated as an act of war. Because it is.
If they are just harboring the attackers through unwillingness or inability to extradite them than that is not. And you should pursue diplomatic means instead. And if those are exhausted just suck it up and put some pickets on the border to murder them the next time they cross over.
4. UN agrees to it in response to a foreign invasion. Eg Iraq/Kuwait
If the UN decides to do something that does not make it right.
The UN is an evil imperialist organization whose purpose is to maintain the current world order and the hegemony of the current powers to be. It was established after WW2 to solidify and enshrine the new split in spheres of influence between the old powers of Brittan and France and the new powers of the USSR and United States.
So if the UN tells you to attack someone that is possibly one of the worst justifications you can have from a moral standpoint.
5. They're building a dam cutting off your water supply. Your country is facing starvation without said water.
If it comes to this you need to ask your self what the hell you were doing allowing your country to be so completely and utterly dependent on one source of water and yet not maintaining a good diplomatic relationship to the people upstream. Like, seriously. If someone has you by the throat like that you should be sucking up to them, maintaining good relations and working to have such big projects succeed in a way that benefits everyone. If things get to the point where one side just unilaterally decide to screw you that means your past decades or centuries of politics have failed.
I know this references the Ethiopian dam on the Nile and it's effects on Egypt. And that's what I am saying that.
So at that point you would indeed be justified in going to war simply because this is an existential attack on your nation just the same as if they had dropped bomb. But only after executing what ever idiots put you in that position in the first place.