There's would not be one optimal strategy, but many optimal strategies depending on the matchup between units. By taking advantages in differences in movement speed, attack range, attack projectile speed, and attack cooldown, a weaker group of units can potentially beat a stronger group.
This is an older video that demonstrates some examples of winning with good micro: https://youtu.be/CdSKD3LRHV8?t=11. An AI knowledgeable of and capable of executing such tactics would be pretty strong.