Recomposition (or Natural Organic Reduction) is already legal in several states: California, Washington, Vermont, Oregon and Colorado!
As of right now, I think the compost is only allowed in national and state parks, but they're doing testing on farms to check if there's dangers to us consuming the crops and it's been very successful and safe.
Most diseases and viruses can't survive the composting heat and the plants are thriving. It uses 87% less energy than cremation and burial and stops embalming fluids from leaking into our ground water. I'm really glad this is an option.
There's a scam company that claims you can put cremated remains in the ground and grow a tree... yeah, cremated remains turn into concrete when wet and the heat of cremation denatures nearly everything beneficial for plants. We constantly have to tell people not to put cremated remains on plants or the plants will join the family member that passed...
With the disclaimer that I don't know anything about your field....
IMO, if eating food that was nourished by dead humans was inherently unsafe, I believe we would have had significant issues well before now. I have no doubt that when agriculture was new, cemeteries and areas where people have died and left to decompose, would have been used to grow food and if it created any problems, I think we would have seen issues before now.
Again, I'm not a farmer, mortician, scientist, or any other preceived or direct authority on the subject.
What you've said is true. In my forensics class, we learned that police can actually use plants to find dead bodies, because you can see a noticeable oval of healthier plant growth. Older cemeteries flourish. There's a few stories from the Neolithic Era about planting crops on the deceased, both humans and animals, but it's mostly been erased from history. It wouldn't surprise me if it's happened during Famines or situations like the dust bowl where civilizations weren't rotating crops and depleted the soil.