I don’t think the future of warfare (if there is one — world peace is possible) lies in mechs either, unless they are extremely fast (supersonic). I would favor a mix of 1) distributed fairyfly bots and 2) massive force projection, 3) the ability for the entire army to run away very quickly when threatened.
Flying machines inspired by insect biomechanics could be very small — fairyflies are 140 microns across. A microgram of botulinum is enough to kill ten people. If you could manufacture trillions of these, your army would be extremely hard to stop. You can’t seal every soldier in a completely airtight container. Advanced (5-10+ years after MNT, if MNT is possible) bloodborne nanomachines could theoretically combat this, but they’d have to respond very quickly. A fairyfly bot could merely fire a flechette deep into the skin, and would be very difficult to locate the toxin quickly.
For massive force projection, we have nuclear weapons. The future of warfare will mainly be about be finding cleverer ways quickly manufacture and deploy them successfully (like being the Terrans in Starcraft.) Given enough dummy missiles and warhead speed, it’s impossible to mount defenses. Currently, we can launch a nuclear missile to anywhere on the globe in less than an hour or so, and a bomber in several hours. This is too slow. The US is building a hypersonic bomber with a two hour response time to anywhere on the globe. Our current ballistic missiles will eventually need to be replaced by scramjet versions. Currently, scramjet technology eludes us, as big projects have pumped tons of money into the field and still failed. What is needed are completely new materials, like a diamondoid chassis.
I can imagine a dense cloud of utility fog being used as a temporary shield for nuclear missiles, throwing chunks of metal in the way of an incoming missile, but this would only work so well. A high-powered laser on the missile tip would let it plow through most obstacles on the way to the target. For this reason, I believe offense will be fundamentally more powerful than defense, to answer a question CRN sometimes brings up.
As for running away very quickly, it would help to have your entire force consist of primarily the fastest unit — this will be different depending on whether it’s the atmosphere, underwater, subterranean, or outer space you’re moving through. Scramjets for air, supercavitating subs for underwater. I don’t know what can move fast underground. Underground is probably safest, as nukes have the smallest blast radius there. Then again, you can move really fast in space. Water also has wonderful thermal absorption properties. I doubt many military strategists have thought much about wide-scale underwater and underground nuclear warfare, because submarines are extremely expensive and slow, and there is no vehicle that can move quickly underground (so far as I know anyway).