Plasmodium sporozoites are the crescent-shaped forms of malaria parasites injected from the salivary glands of mosquitoes into the skins of their vertebrate hosts. To proceed towards the liver of the host, sporozoites individually migrate at very high speeds and with relatively few adhesive interactions. By contrast, in the mosquito sporozoites often exist as collectives. Here we study their motion in collectives extracted from salivary glands, a situation in which dozens of sporozoites form rotating vortices. Complementing our experiments with quantitative image analysis and agent-based computer simulations, we find that, owing to their mechanical flexibility, single sporozoites are sorted according to their curvatures and speeds, and that these effects increase with vortex size. We also find that the vortices undergo oscillatory breathing because the thrust from the motility force of the single sporozoites can be stored in their elastic energy. Our findings suggest that the malaria parasite has evolved flexibility as an essential means to adapt to its mechanical environment and to ensure efficient transmission. In general, our work demonstrates how single-particle shape and mechanics can determine the dynamics of large, active collectives.