The races whose heroes gain a lot of magic and knowledge are Mages, Demons, Necromancers, Warlocks, and Dwarves. Now, let's go through them one by one:
For Mages: Logistics, Education, and Spell Power are essential. Luck, Leadership, Defense, and Attack can all be obtained through artifacts, both crafted in the forge and purchased in the shop. Machines are not very useful for Mages. Mages definitely need Summoning. It's very helpful to take Darkness or Light to support their weak troops or weaken enemies.
Demons only need Logistics. The rest is up to your preference. Chaos and Darkness would also be very useful. They have plenty of mana, and Hellfire doesn't consume much, especially with Imps.
Necropolis cannot do without Darkness and Summoning. I won't say anything about Darkness, but Summoning is a good substitute for Chaos. This includes raising the dead, creating a phantom, and causing an earthquake. They don't have much mana, but this can be compensated for with Education and Spell Power. Luck, Leadership, and Machines are useless. For the rest, choose Logistics, Defense, or Attack.
You've already described Warlocks.
And Dwarves. For Dwarves, only Darkness is useless. Summoning is needed for their ultimate ability, although it's not absolutely necessary in this case. Chaos is the only destructive form of magic for Dwarves; they are masters at it, and it's also required for their ultimate ability. Light is also very useful, especially if they have a set of Dwarven artifacts. The rest is up to your preference.
Весьма хороший попутчик... До первого перекрестка.