https://www.technologyreview.com/2022/10/13/1060945/artificial-intelligence-life-death-decisions-hard-choices , https://www.technologyreview.com/topic/artificial-intelligence
Several people might like to use A.I. to help them end their suffering. Some people want to end their pain or degrading condition. However, what if AI wanted to find other reasons to kill off people?
There is a Star Trek (episode) called, A_Taste_of_Armageddon. The people on two warring planets use a war simulation program to avoid the physical aftermath of a war. A little like a war game version of Simcity, but instead of killing off a selected amount of sim people, actual people are required to go to a disintegration chamber. They must report to a death chamber within a certain amount of time, even if they are in good health and still want to live.
https://memory-beta.fandom.com/wiki/A_Taste_of_Armageddon
https://sfdebris.com/videos/startrek/s023.php