The road to strategic hell is paved with good intentions. Consider the words of General Sir David Richards, the chief of defence staff. We can't defeat al-Qaida and its ilk, he believes, but we can contain it. In other words, we might never destroy it physically or ideologically but we can limit its potency and lethality "to the point that our lives and our children's lives" are "led securely". Amen to that.

But what does "containment" look like? It is a moveable idea. During the cold war, containment meant different things to George Kennan, its intellectual architect, and the later US presidents who expanded and militarised it.

At its best, it is a practical idea. It holds that, without exhausting or overextending ourselves, we can bound a threat and curtail its ability to operate, then wait patiently for it to wither into an irrelevance or nuisance. It works well with a self-defeating enemy, be it the Soviet Union with its doomed Marxist-Leninist system and imperial overstretch, or al-Qaida, a movement that habitually alienates the very Muslims it claims to represent. Containment is not only about outlasting the enemy, but about keeping costs down and avoiding self-defeating behaviour.

But General Richards's containment is more ambitious. It involves "upstream prevention", "education and democracy" and – judging by his other recent remarks – maybe a future military intervention in Yemen. He doesn't favour more military interventions now, but it would be "barmy to say that one day we wouldn't be back in that position".

This means using our (depleted) wealth, our (reduced) military and our (dubious) confidence that we know what is good for others. Containment means surgically rescuing failed states, or preventing their failure. It means protecting and strengthening friendly regimes on the turbulent frontier. After all, didn't 9/11 happen because terrorist training camps sprang up in central Asia? Containment now means disrupting that chain reaction.

This fits with the UK's recently unveiled national security strategy. It sees an uncertain and chaotic world, and backs prevention. But while it sees the world as dangerously unpredictable and non-linear, it treats our behaviour as rational and its results predictable. In other words, we bring order into chaos. What could go wrong?

As it happens, plenty. As a matter of cost, it generates expensive and protracted commitments. Entanglement and intervention usually cost more and take longer than we think. President Bill Clinton said US troops would be in Bosnia for only 12 months, but they were there for 10 years. The Taliban, we were told years ago, were a busted flush. The overestimation of our power and the underestimation of resistance has been a signature tune of the war on terror.

And there are other dangers. What if, in appointing ourselves as world police, we are agents of chaos rather than order? Our activism will probably have perverse results, unintended consequences and blowback. It could create accidental guerrillas. It could drive neighbouring countries into new confrontations with us. Democracy promotion can promote communal violence or unwelcome new regimes. Evidence of these dangers litters the decade.

Confident activism carries an added danger of moral hazards. Adroit armed groups can exploit and escalate conflicts to draw us in, using their victimhood strategically to wag the dog.

An endless project of armed social engineering is not containment. It is a liberal crusade – more like rollback, to use another cold war term. It certainly will be, by the time our enemies' propaganda is broadcast. Those who believe we should counter terror this way do not intend endless war. But that is where their logic leads. If Yemen tomorrow, what of Somalia or Nigeria or the Sudan, other potential incubators of terrorist networks?

Radical Islam feeds on many things and is not reducible to a reaction against western interlopers. Richards is right in that respect – militant jihad will always be with us. But military occupation energises and flatters it. And if we follow terrorists with battalions everywhere they go, it concedes to them the initiative to bleed us further.

And why should we think failed or weak states are intolerable to our national security anyway? The 9/11 attacks were not fundamentally "caused" by a weak state in Afghanistan (which incidentally was more strongly ruled then than now). The critical spaces that terrorists used to strike western interests were flight schools in Florida and meeting places in Hamburg. The US could have interrupted it earlier with more effective law enforcement and inter-agency co-operation. And since 9/11, the US and its allies have reformed themselves, steadily marginalising al-Qaida into a third-order pest.

States that implode into violent disorder are not hospitable to terrorist networks that need sanctuary and security to train and plot. And given that Islamist terrorists are often highly modern, well-educated professionals who use the tools of modernity even as they yearn for a lost medieval empire, it is not clear that we can buy them off by making Muslims abroad richer, more modern and more middle class. A decade of this strategy should be a warning against naïve sociology and the promiscuous use of military force to back it.

So what's the alternative? It's time for restraint over activism, for power conservation over its expenditure, for doing no harm over doing good. It means combating terrorism with ordinary police work and intelligence sharing and calibrated disruption. We should focus our military most on what it does most effectively: secure our territory and sea lanes, deter other states and exist as a wise insurance policy for emergencies. Let's try that for the next 10 years, and see where it takes us.

It also means being restrained in how we think. The world may be chaotic. But we are part of that chaos. Except in atypical circumstances, the military is not a surgical tool of political engineering, but a bludgeon wielded by specialists in violence. We therefore don't have the power to alter the political condition of others at our own timetable.

If we want to contain own worst enemy, it is time to look in the mirror.

•The opinions expressed in this article are the author's alone, and do not represent King's College London or the Joint Services Command and Staff College