Iraq and Afghanistan have little to do with pre-emptive strikes and just war theory.
They are what they are, wars of imperialism. This is about American and western hegemony in a region where our influence has historically been weak since the 1979 overthrow of the Shah of Iran.
There is no "victory" in either country. Hell, find someone who can even describe what "victory" looks like in detail (get them to discuss the different sectarian factions in each country). If you have friends or family who are officers (even enlisted personnel) in the U.S. Army you'll quickly learn the overall picture of the war. We're talking about projected twenty year deployment cycles, Second Luey's fresh out of school running companies (typically the assignment of a Captain). We still use one of the world's least soldier friendly rifle. Soldiers still pick up and use AK-47's found on insurgents for Pete's sake!
The problem is twofold. 1) guerilla warfare is much more advanced and destructive than it once was. I.E.D's are simple to make, but can be very advanced. They can be hidden easily and set off remotely, using mobile phones or two-way radios. But the old ways of fighting guerilla war still have the same devestating effects on morale. Soldiers get bored. Things become routine. That's when they don't notice that something is different - maybe something is just out of place, or the people seem more tense than usual. 2.) There are really only a few ways to overcome the disparate factions of the insurgency.
1. Absolute brutality. We own up to our imperial stance and use the tactics of the Belgians in the Congo, Britain in Iraq, or Stalin in the -stani states. In this scenario it is always shoot first and ask questions later. More than that, if a village spawns insurrection, then the entire village goes down. We need a lot of special ops forces for this. No conscience and some racism helps.
2. Show of force, mixed with as little of #1 as you have to use. This is more of the Franco-style dictatorship. No street in the entire country goes without the presence of soldiers carrying machineguns. Laws are absolute and each soldier acts as policeman. Courts are all military. Petty crimes are judged by soldiers in the field, no questions asked. We need 400K to 500K troops for this. It helps to have one enemy for the people to rally against. Franco had the Basque, PKK might work?
The benefit to #1 is that you don't need as many soldiers because you don't care about civilian casualties. In fact, you do care about civilian casualties - but you want more to show just how ruthless you are. Use some poison gas (the British did!) and all you need is some air power. Use artillery pieces too. #2 requires extra troops and a lot of fascist-style flag waving and such. The benefit is that you'll show the people how law and order is done at the barrel of a gun.
Of course all this time you probably should be building a few hospitals and schools for the chosen faction that will lead the country after you're gone. I mean, someone needs to praise the effort. Otherwise, what is the point?
If none of this appeals then I suggest these ventures were a massive mistake from the beginning and you are fighting two wars with one hand tied around your gonads.