You cannot as the ability AI has nothing to do with strategic AI.
Ability AI is hard coded and the AI will even cast abilities when they are not running any AI. The ability tactical AI uses certain hard-coded conditions to determine when to cast such as number of enemies in area for AoE moves (sounds like your problem), being attacked, facing casters etc. The emphasis is this is hard-coded.
You will need to trigger your own tactical AI to solve your problem. This is done by using a trigger with the necessary cast events that evaluates if an ability should be cast in response and then does so if it was determined appropriate. This can either run in parallel to the standard tactical AI (complimentary, allows it to deal with special cases like lone units not normally possible) or be the full AI for the ability in the case of abilities with no tactical AI present (channel, death pact etc).
There are a few considerations you need to factor in. The trigger should only be active if an AI has such units that require its tactical decisions so as to prevent constant overhead (especially important for generic events). Just because you think it is appropriate to cast an ability does not make it so (casting a huge AoE damage ultimate on a single target is pretty stupid strategically as casting it on that 30 unit army attacking your base would be far more effective and deal 30 times the damage). Also you may need to handle strategic orders interacting with the casting or the AI might not move after a cast or might move during a channel.
In SC2 you have full access to customize tactical decisions such as by writing tactical AI functions and linking them to units/abilities. This feature is an under-ratted improvement over WC3 that few people have looked into.