A punishment that penalizes without forestalling is indeed called revenge.
Reflections on the Guillotine (1957)