Research has found that larger ant colony size also favors more worker castes. The most numerous caste is that of the mid-sized general purpose workers. By not having thick exoskeletons the individuals in this caste are faster, can forage better. They are lighter in weight and thus are better at excavating the nest. By carrying less exoskeleton weight, they need less energy to move about.
However, another caste which is present is the prominent large "soldier" size. This caste is larger than the typical worker, has a thick exoskeleton, and massive jaws.
"
Eciton burchellii, an army ant of New World tropical forests, shows an extreme worker polymorphism with four recognized physical worker castes."
https://pmc.ncbi.nlm.nih.gov/articles/PMC2391184/
Larger colony sizes favoured the evolution of more worker castes in ants
https://pmc.ncbi.nlm.nih.gov/articles/PMC7616618/
Termites similarly have a dedicated soldier caste to defend the nest.