I might be a little edgy here, but...I don’t really see an issue with cannibalizing the dead.
With caveats, granted. Someone dies from an illness, don’t eat them. Plus, avoid the parts of the body where toxins build up or pose the most danger, like the brain. I would also think you would want to avoid the liver, kidneys, and gallbladder. And any cancerous growths.
But eating the remains of someone who died due to old age is probably something that only comes up uncommonly. Plus, the amount you would be eating would be such a small percentage spread out over long periods of non-cannibalism that the health effects would be negligible.
Granted, I don’t know much about cannibalism. Maybe I’m missing something. But I figure that I won’t really care after I’m dead. There are plenty of ways of disposing of dead bodies, too. Just cremate me or eat me.