I think the problem could at least partly because the AI runs out of gold and can't afford the better units so it just builds what it can afford at the time. Hence the large number of weak and middle range units. Because these are thrown away in combat they never get the number of perks a players units acquire.
Testing what gold an AI has is possible by using the Diplomacy sceen, assuming all its gold and mana are available there for diplomacy. At turn 120 and at war with me and most other AIs they typically have 30 gold and 15K mana. Yet instead of casting a whole host of summoned troops they spend their valuable casting time Harvest Blessing, Mana Spring (hence the mana surplus perhaps?) sometimes on new size 2 cities where the bonus is small. If they spent that time casting Earth Elementals or even Ghost Wolves they would put my forces under much more pressure.
In my recent game I have faced lots of mages, minotaurs and noble werewolves from one Impossible AI and even a temple unit, a Kroms Huscarl but it had just been built and hence no perks. But these units were just run into a confined space blocked by my earth elemental (regenerating) with a high level vampire and an ancient lich that just one-shotted them most of the time. I have also seen quite a few advanced units with good perks, like veteran skeletons, stubborn knights and the human veteran with maybe 5 perks that have been bought with gold (or free in starting city). Backed up with archers and rats to give the malus they put me under some pressure sometimes, other times they just ran into a meatgrinder.
With the amount of mana they stockpile I think the AI would put the player under much more pressure if it could cast more of its spells per turn. Rather than simply increasing their ability to cast spells faster I suggest they can cast (or be in the middle of casting) one of each 4 spell categories.
So each turn they can cast or be casting:
a Bane / attack spell (fireball, weakness, firestorm ...)
AND a Heal / Blessing (heal, frost weapon, elemental resistance ... )
AND a summon spell (ghost wolves, earth elemental...)
AND a spell in the Others category (counterspell, teleportation, greater dispel ...)
Of course the player would also have this multiple spell casting as well and this would make magic a much bigger part of the game, and it would be worth increasing mana production in the middle game. By spreading out the AI's spell casting into all 4 categories we should get much more interesting variety of spells every turn. The diplomacy screen would need to be changed to display the 4 spells each of the the AIs might be in the process of casting.