Termites are very efficient insects, and their social structures are so complex that workers will have different tasks at different ages. This is known as polyethism, and it is present in other social insects such as ants and bees. However, when it comes to studying this phenomenon in termites, things get a little bit blurry, given the reclusive nature of these insects.
The 3,000 known species of termites in the world are divided into two main groups. You have lower and higher termites. The lower termites are the ones we mostly have to deal with. These are the ones that are capable of digesting wood. The higher termites however have an extra capacity, and that is their ability to live in symbiosis with bacteria and fungi. This latter group of termites is also known for its diverse morphology, nesting habits and foraging strategies.
In lower termites, polyethism is virtually non-existent, meaning that there is no task division as termites age. Higher termites on the other hand, have many documented cases of task division by age. For example, you will often see older workers and soldiers taking on tasks that require them to leave the nest.
Then you have the Coptotermes genus, which is a termite group that is found between the lower termite and higher termites. The Coptotermes are able to digest wood, but behaviorally, they are closer to higher termites. Entomologists believe that this genus represents an evolutionary transition between the two main groups.
In this genus, we see polyethism, where the younger workers are mainly tasked with caring for the brood, while older workers have tasks that are riskier, such as foraging, cleaning the royal cell, and taking care of the queen. However, this polyethism manifests itself in a very peculiar behavior in this species.
Older workers are the primary recipients of what is known as proctodeal trophallaxis, or, in other words, they eat the feces of other termites. Termites will often circulate food between each other, creating a sort of social stomach. Through this process, no nutrients are wasted and they are shared between many members, but at some point, the food loses the nutrients and becomes feces. In Coptotermes, the older termites will be recipients of these feces, and their task is to expel them into special locations in the nests. Talk about respecting your elders. But the behavior makes sense from a collective standpoint, since older workers are at the end of their lifecycle, so their sacrifice strengthens the colony.