Digging is going to be difficult. They aint going to get no solar down there, and things get pretty low energy after you get under the topsoil, which itself is pretty low energy compared to anything resembling fuel. They also have zero leverage, so compacted soil and stone is going to involve a significant extraction fee. You can't convert something into something else without liberating it from being what it was. So at the end of the day you need to be able to break things and convert them, and that means power, and not a small amount of it. Also note that their small size means low storage, and standby-mode burns some energy, so you are on a time-limit to maintain an energy income or else you will turn off for good. Burying them for long enough with no link to an energy source counts as a kill, they will turn off and after a few months lack the power to turn on again if their situation improves. So a particularly intense World-War Two artillery bombardment would be enough to break their networks and bury or destroy their individual elements, I would expect it to be an effective countermeasure if you didn't have anything more pervasive like just irradiating the area.
Radiation is likely to be your go-to response really. Just track any incoming projectiles and blast them with something highly penetrative. Lead doesn't stop everything and enough rads will break anything, starting with the most sophisticated elements...
Once you get a swarm together then you can start construction a mind of some sort, which can then coordinate energy raids, likely hunting animals, and energy networks to transmit energy to your mining operation, solar if you think you can get away with it or hunting if you think you can catch anything with measures that won't reveal your presence. Then you need to spread like crazy, because once they find you they can kill you. They may need to reapply the napalm a few times to be certain, but it will work. But unfortunately you are up against psychics, and all they need to do is pull off a "bad vibes" effect and they can start triangulating all your incursion sites and start cleansing the area until their psychic senses give the all-clear.
Don't get me wrong, it is a good technology. Machines built from the stuff would be capable of insane field-repairs, the efforts the enemy need to go to to sanitise an area after a battle would be significant, and its ability to irritate as you constantly throw invasion packets across known space would be effective, but they are extremely far from unstoppable. Mostly, though, they would be slow. People love to show stuff just melting in media, but likely it would take a great many revisions to get something that effective. Most grey-goo in media seems to have many many many generations per second, and I would expect it to be more like a couple of generations per day when you start out. Don't be surprised if someone falls naked into the vat of grey goo, climbs out, goes through decontamination, and spends a couple of days with symptoms resembling sunburn before being back no worse for wear.
Certainly worth pursuing, but nowhere near an autowin.