In our area, (NE Washington) leach fields have to be at least 18 inches to 3 feet deep. I am not an expert but I don't think most food plants (except for trees, maybe) have
roots that go that deep.
If there is a real concern, maybe put some non food but beneficial plants in that area? Most leach fields are under 100 feet long and can vary in widths. We have ours planted with oats right now. We only planted that as it was a disturbed area, we had the seed, and just wanted to get something on it right away. Later that area will be used for plants for our future nursery operation, with non food plants on it for root stock. Shallow rooted plants though, so they will not interfere too much with the leach field.
Farmers that use sludge from treatment plants have to plant crops that are not for direct human use. They can be for growing animal fodder, and then the animal is considered the food source. They apply the sludge by spraying it directly on the ground. Stinky mess, when driving through farmland having it applied.
Good thing I suppose, otherwise cities would be swimming in their own wastes pretty quickly.