In the Penal Colony
This Franz Kafka story is a study on what can happen when you put a psychopath in charge of a process (or country) in which they have unfettered power and can make decisions over life and death with impunity. The story deals with some heavy themes: justice, due process, capital punishment, torture, sadistic voyeurism, and the difficulty of institutional change (even if for the good!). Central to all this is the “machine”, which seems to know that its time has come and chooses to self-destruct along with the only person left who cares about it.
In this story by 
In this story by
In this story by
The humorous frame story of this unlikely tale by Samuel Clemens (aka
This story by
This story from