By looking at the how auto battles play out there are some simple rules you can apply
First heals/shield mystery will be used if any ninja is >100% selecting the ninja with least health
Second CC type mystery will attempt to control ninjas using mystery regardless of position
Third higher charka cost mysteries if 2 mysteries have the same cost the mystery in a higher position will be used
Then you have the other mystery type priority
- Damage
- Barrier
- Buff
I hope by following this it can help you understand how auto teams select mysteries