I am building my microfarm on 2 to 5 acres of land within the next couple of years in a rural mountainous area. Some of the land parcels I am looking at have septic tanks. I have a genetic immune system disorder, so that is scary for me. I have to be absolutely safe as possible in this regards. How far away from the leach field do growing areas need to be? This affects how much land I need to purchase. What about a high rain or flooding situation? Can contamination occur beyond the area of the leach field? How long can contamination remain in the soil? What about fruit and nut trees? Can they take up biological contaminants such as e Coli into the fruits or nuts? I am wondering because of the mulberry tree growing in the yard of my current suburban home where there was a feral cat community of 35 cats just two years ago pooping under the tree, in addition to old, 1970's era, leaky sewer lines.
Just to be clear, the septic tank is not so much of your concern as the leach field, since that is where human waste should be coming out. However, as you point out, sometimes pipes get leaky, so I would watch out for both. I know here, a septic tank or leach field can be no less than 100 feet from a well. That is rather close, but drilled wells are sealed from ground run-off too...gardens are not.
As a larger farmer I must have what is called a Comprehensive Nutrient Management Plan (CNMP for short) and it is a fancy title for saying, just where I can spread my animal poop. In that, it specifies that I cannot spread manure 300 feet uphill of a private well or water body, or or 100 feet down hill of a private well or water body. While you could certainly go farther away to be extra safe, I ASSUME the powers that derived these rules did some testing and were qualified in making this the minimum standards.
Not sure if my answer helped or not, but with animal manure at least, that is the USDA requirements for set-back distances.