I'm thinking about
Really, it seems the only one way to stand against an insurgency, and it's always ineffective.
The arabian invaders in the Middleage lost their religious passion very soon.
The communist regime in Russia was an outlaw only in first several years, then it evolved and became a full participant of foreign relations.
Every revolution has its end. The question is, will it be killed (like ISIS) or die itself (like USSR and, maybe in future, Taliban?).
In my memory the only long term 'successful' interventions / occupations by a foreign power are those where the original population is 'replaced' by newcomers (usually goes with massacres, also more a thing of the past fortunately), or where the occupiers remain on station for decades. For Afghanistan from what I have learned, much power is still in tribal hands. Or in other words local/regional 'warlords' who have control over the (limited) means of productions.
Until enough wealth and power is in the hands of the 'middle class' and they can get organized with rule of law that is actually enforced and righteous / inclusive for most people, the Taliban might be only tangible group which can provide some form of stability.