It's definitely overall team ini, as shown by the Ultimate Training ini mode, you'll come up against a team with only 3 ninjas (including 1 auto-barrier ninja of course) and it's a guarantee that your auto barrier will go up.
The only other way is to practice on your timing and cast a manual barrier just before that ninja is about to do their standard which will be replaced by the casting of that mystery/barrier. This is extremely risky and takes a little while to get used to but can turn the tides in battle, so to speak.