South Vietnam revisited!
FTS, in three of those cases you mention (i.e. Afghanistan, South Vietnam and China), US-backed forces were certainly given the capability to resist. What they lost - or perhaps never had in the first place - was the will to fight.
To quote the observations of a recognised military genius, Napoleon Bonaparte:
"In war, moral power is to the physical as three parts out of four."
The real challenge, it would seem, is not in throwing money, materiel and manpower at the problem - it is in somehow inspiring people to fight; a much more subtle challenge.