This disease happens naturally and cannot be completely avoided. However the impact of it can be significantly reduced by having a hospital provided with medical supplies.
When enabled a red slider appears. If the total number of animals in this farm gets above the red slider, then the excess number will be slaughtered for products like meat. In case the slider is set to full capacity it will only slaughter the born excess that would not fit into the farm. If slaughtering is disabled, no meat gets produced.