I think we should have caged our expectations to reality. Desert Storm was such a success because we did just that. The campaign was to remove Iraq from Kuwait. We removed Iraq from Kuwait, crippled their ability to try it again, and we went home. We could have done something similar in Afghanistan...attack the Taliban's strongholds, destroy as much of their capacity to inflict fear on their neighbors, and walk away. Instead, we're on our second decade of trying to build a nation where one has never really existed in a form we're familiar with. Same with Iraq take-two...we invaded the country, dismantled every part of the functional government, then we were caught off-guard when we had a hard time building a democratic government from scratch.
My point isn't that we should never get involved. It's that we should take a cold, hard look at whether that involvement is in our own interests, rather than the pursuit of some noble and unattainable ideal of "liberty" or "justice". When we get involved, we should do so on the smallest scale possible. At our current rate of progress, we'll be in Afghanistan into the 2050s, and that's probably being optimistic.
In short, we need a more pragmatic approach to our foreign policy. Saddam was a terrible person, but because he ruled Iraq with an iron fist, he kept groups like ISIS from emerging. Qaddaffi was a long time antagonist of the US, but he was willing to work with us on getting rid of WMDs. Now Libya is just a giant, messy civil war (much like Syria)...perhaps the US needs to recognize that foreign dictators don't have to be good people to be useful to US interests.