Quote: 'set the priority to fortress to about 10 million, or some other silly number that can never be reached, and ignore targetting rules based on target strategic strength
It's pretty much these things :
1. "if stack strength is 300+ and it's intercontinental or on the same plane as any Jihad fortress, attack the first such jihad fortress".
2. Set the priority of picking that continent as the main action continent to a huge amount.
3. Reduce the number of garrison units needed, especially strong ones
4. Tiles with jihad enemy units on them count as empty for purposes of finding paths towards a target. (but not for anything else!)
Note that "1" does not use priorities at all, it's not increasing the priority itself. Doing so would not allow the AI to ignore targeting rules. It merely adds a different kind of attack check before the usual.
To go through towers, that would also need to be special cased that way and I don't think we have that sort of space at least for land attacks.
So you are effectively asking for a new attack type that is evaluated before normal attacks but after fortresses, and says "if primary jihad target on other plane exists (and no jihad target on this plane exists?) and tower exists on continent then move to that tower." as well as"same as above then set the continents with the tower highest priority as main action continent" plus the same attack type for intercontinental to target the nearest tower.
btw, what if the tower is blocked by a player who is NOT the jihad target? Then the AI rams into the units and takes it back due to that "target" not being an enemy - and I can't and won't make an exception to that. Note that stacks on the target matrix do not store their owner, only their strength so the AI has no way of knowing this.
Anyway, I don't think this can be done, due to land attacks not having another 3-500 bytes of free space for such a complex check. If you really want, I can check for space but I'm 99% sure there isn't any.