I don't see this being all that different from a typical decision tree. It seems to me since the opponent already starts off with an impossible huge advantage in resources, you just put some basic guideline with some randomness and if the enemy attacked you 30 times with slight variation each time, at least one of those times might turn out to be challenging.
This kind of reminds me of the talk on Fantasy General's AI which is surprisingly similar to this. In that game, Trail Runners are pretty much the strongest unit in the game. The only unit that can counter them are the Heavy Cavalry (Nightmare and Shadow Knights), and you need like 2 Heavy Cavalry per Trial Runner because they get invisibility so you have to sacrifice one unit to see them (the AI doesn't cheat in regards to invisible units)
Let's say you got 6 Trail Runners in an army of 40, which is as imbalanced a mix as you can get before you trigger the AI's cheating method to compensate. The AI will see that your army has a relatively high portion of Trail Runners and it will be more likely to build Shadow Knights, but it will never just outright build 12 of them. What ends up happening is that Trail Runners aren't too great at finishing Shadow Knights off so you'll end up failing to kill a couple as they retreat, and meanwhile the AI is buying more Shadow Knights than he normally would. So eventually you might have a case where one of your sub armies with 4 Trail Runners run into 8 Shadow Knights and then lose horribly.
The AI is never actually trying to setup a trap for your Trail Runners. Similar to the game described, the AI pretty much has something like 100 times your resources, so as long as it has territory to retreat to, it'll experiment defenses that involves an army weighted by your unit choice + whatever that survived. Given the number of armies the AI has at disposal, you're likely to run into something that just happens to counter your army setup at some point due to sheer probability.
Now this system isn't bad, but it is only possible when the AI gets to start with way more resources than you have. The problem with this approach is that a lot of the time the AI attack ends up being total wipeouts, and the resources needed to do this generally far exceeds the amount of cheating allowed to a computer. Most of the hardest setting in similar games gives the AI at most twice the units compared to you. If you were doing the strategy described here, the AI will easily lose. You're talking about an AI with tens if not hundreds times the resources you got to pull this off. It probably works for a single player, you versus the world scenario, but it won't work for a 1on1 situation.