Poetic justice
In literature, poetic justice was a literary device where virtue was rewarded and viciousness was punished.

In 2161, Jonathan Archer considered Rigel X – the first and last planet  visited prior to its decommissioning – to be poetic justice. ()

In 2257 in the mirror universe,  stated that it would be "poetic justice" when  was killed by his own creation, the spore drive, but instead had him shot, stating that he was only kidding and he hated poetry. ()

In 2268, when questioned by a time traveling Worf on his plan to assassinate James T. Kirk, Arne Darvin would only say that his death would have a certain poetic justice to it. ()

In 2375, the fact that antimatter waste had weakened the bulkhead around the cargo hold of a Malon export vessel so much, that a direct phaser strike would disable it, was called poetic justice by The Doctor, a sentiment confirmed by Tuvok. ()

Later that year, after the Battle of Cardassia and the death of over eight hundred million Cardassians, William Ross, Benjamin Sisko and Martok visited the surface of Cardassia Prime. Ross and Sisko were appalled by the carnage, but Martok told them those were dead Cardassians all around, claiming Bajorans would call this poetic justice. ()

In 2376, Kathryn Janeway threatened Noah Lessing with dropping the 's shields and allowing his "little friends" to find him. He called it murder; she called it poetic justice. ()

See also
 Poetic license
 Justice

External link 
 
Literary devices