Americas involvement in the Middle East only serves as fodder to those rallying against us. I've said it before and I'll say it again, you don't fight propaganda (terrorism) with weapons, you fight it with conflicting/competing propaganda.
This. Our mere presence, regardless of any potential propaganda put out by our side, is enough to rally the locals against us. We shouldn't be dealing with the Middle East militarily. Non-petroleum trade, diplomacy, tourism, cultural exchange, etc...sure. We can't lose with those interactions.
I fear that what needs to happen is a complete erasure and redrawing of the national boarders by the people of the region. This will be a long and bloody process, but it is the ultimate fruit of the British (primarily) and other allied powers setting those up in the first place after "The War to End All Wars". I wish I could see a way to avoid that, but I simply do not.