Auto-translated
Yes, I also have doubts about the technical implementation.
But even with such an implementation, the racial bonus won't work in the early game, since you need to build a structure to choose sworn enemies, and it takes quite a while to build that structure.
That's what's frustrating – an entire base and a perk that don't work for a long time.
The motivation to change sworn enemies could be "strengthening" the army through special perks. As far as I remember, you have implemented such perks – summoning Manticores, for example.
In The Restoration of Erathia, Necromancers get Death Knights.
In the end, if I know that the opponent will have a достаточно dangerous stack of high-tier units, then the motivation to find it on the map and set it as a sworn enemy is quite significant.