I remember reading a while back about food that had been fertilized with human waste. The folks that ate the produce got sick. Don't know much more than that.
They either did something stupid, or didn't actually get sick for that reason and blamed the wrong thing.
Horse dung can contain pathogens that affect horses, but only a small portion of them will also affect humans, so you're fairly safe using it on food crops directly. But any pathogen in human manure obviously grew in a human so can affect other humans. So human manure does need to be properly composted before use. During composting, the microorganisms that are designed to live in a human die out, and are eaten by microorganisms that are designed to live in a soil or compost heap. By the end of that, there's nothing dangerous left in it, it's no more dangerous than soil.
So if you do something stupid with human manure - like spray liquid manure from a septic tank onto your lettuces, then eat them without washing them first - yes, you may get sick. You might get away with it if it's just your own manure (as you already have those pathogens so aren't introducing anything new to yourself), but if it's someone else's then there's a risk of disease. Of course, nobody in their right mind would do that, it's obviously stupid. But stupid people do exist in this world.
On the other hand, if you properly compost your human manure first, you can use it anywhere - it's completely harmless. Or, even if it hasn't been composted, if you use it in a way where it won't come into direct contact with the food, you'll also be safe (e.g. if you do your business in a hole beside a fruit tree - you're not crapping on the fruit and then feeding it to someone else, the faeces goes into the soil and never goes anywhere near the fruit).
Just don't spray raw faeces on your salad.
Also - it's not "waste" unless you waste it. It's manure.
That may have dealt with treated municipal sewage waste, which is sometimes applied to farmland.
That is another possibility. Municipal sewage sludge contains all sorts of chemicals from domestic cleaning products and factory waste, and those compounds are far more dangerous than the manure. Over here, sewage sludge is used to help remediate land after mining - it is cultivated into the site to help build new topsoil, before the land is planted in trees. It is not used in food production because some of the chemicals in it are harmful.
This is one reason flush toilets are so terrible an idea. Human excrement is a valuable nutrient-rich resource. But city sewers mix it with poisons, turning it into toxic waste and making it far harder to recycle. As a result, sewage sludge often ends up being landfilled.