Engineering Upgrade
You cannot actually get around the 5 skill limit of heroes; I've tried editing the object data directly and more than five just seems to crash WE.
You can, however, make different versions of the Engineering Upgrade ability to change the spells being learned. This tied with a few triggers and some "dummy" spells can make a bug-free ability-learning system.
A "simple" example of the system is attached. If you actually use it, credit would be nice!