Most won't like my answer, but I believe it's important to cull any sick birds promptly for the well being of the flock. Treating seldom works long term and it keeps carriers in the flock.
Good ventilation and a spacious coop are important, as well as keeping stress down.
Not bringing in birds from multiple sources or bringing in adults which can be carriers of many diseases is another good practice, as well as quarantining anything older than day olds.
Since my flocks are free range, we are proactive against predators. Keeping hiding spots down, cutting taller grass where they can hide helps. Motion activated lights, routine inspections and a trio of donkeys as well as our dogs keep them away. When one becomes a problem we take care of it.