This article in Wired says social insects like ants and bees have a variety of behaviors that reduce pathogen spread in their crowded colonies. They range from obvious ones like keeping the nest clean and keeping waste outside, to forms of social distancing where they reduce the number of other individuals they are interacting with. Some species also swap body fluids intentionally to spread antibodies, which reminds me of the old stories where mom puts all the kids in bed with the first one to catch the mumps or chicken pox.
I’ve always found ants interesting because there are enormous numbers of them, rivaling or exceeding human biomass, they build cities and transportation systems and hunt and gather and farm and fight each other, and yet they don’t negatively impact the environment. They are the environment and nobody ever asks whether their population or their consumption patterns exceeds the planet’s carrying capacity. They also adapt just fine to all kinds of novel and damaged ecosystems that we are creating.