I was thinking of just making certain towers not target certain enemies unless it was a last resort or even not at all. For example, fire enemies don't take damage from fire towers, so fire towers should just not shoot at fire enemies.
It could even be something like a tower that will have a target preference. For example, ice towers will prioritize unfrozen water enemies to freeze them, then will prioritize unslowed enemies to slow them (the ones that can be slowed anyway), then target fire enemies since they take bonus damage from them, and finally, if none of that applies, target the farthest enemy in the path that's in range.
What do you think of this approach?