Honestly, coccidia is everywhere. (the correct term is coccidia, cocci is a different thing, though most of the time it's assumed people mean coccidia) You can't get rid of it, and it gets moved around on shoes, wheels, other equipment, clothing, etc. It survives for a very long time in the environment.
What I do, and since doing this have not had a single outbreak, is take a large plastic plant saucer and fill it with dirt from my yard and put it in the brooder starting in the first couple of days after hatch. They can scratch, and dig, and peck and dust bathe in it. It exposes them gradually to the microbes in the soil while their immune systems are maturing. It gives them a chance to build immunity without being overwhelmed and getting sick. The plastic saucer makes it easy to dump, clean and refill daily. You should still have the medication on hand in case you have a chick get sick. I used to have an outbreak everytime I moved chicks outside. Since starting this system I have not had that happen in many, many years. Warm, wet, conditions and lots of droppings build up can bring about what's called a coccidia bloom, where larger numbers than usual are available in the environment, and those conditions can also cause an outbreak. Warm and wet and droppings is why brooders are a prime place for outbreaks. Once birds are exposed and recover, they should have some resistance and not get sick again unless exposed to a new strain (there are about 8 strains that affect chickens) or unless their immune systems are weakened by something else.