@Philippe
A lot of work went into SA and CE's federations, be it theocratic or alliance based. If you want to dislodge them, don't rely on game mechanics, put in a comparable amount of work and you might be able to replace them. If you feel that's boring, try to change it either from the inside or outside.
Like what was stated in relations to the combat script. 10 soldiers will almost always beat 2 soldiers. It's not a bug, and a realm with tons of active nobles will likely beat a similar realm with almost no active nobles. These are not bugs. There is nothing to fix here except telling you to go and actually play the game. :-/