There's a difference between political failures and military ones. Apples and oranges. No amount of military power can compensate for a lack of (or unachievable) political goals.
Korea, Vietnam, and Afghanistan all lacked coherent political goals. "Destroy military forces supported by half the country" is not a valid strategy.
Even then, some places like Afghanistan don't change much--and they're still completely unbeaten by modern militaries.