On the off chance that someone both cares about and doesn't understand what's going on with the "What is the object of the act of execution?" question:
Here's a diagram of the types of killing St. Thomas discusses under the vice of murder, which he opposes to the virtue of justice:
Figure 1. Schema of ST II-II, 64, On Murder.
Now, nobody's arguing about killing plants, or about whether clerics may kill. So here's a subset of the above figure, with the justifications St. Thomas gives for those types of killing he considers lawful:
Figure 2. Schema of ST II-II, 64, articles 2, 3, & 7.
While of course St. Thomas is not himself the Magisterium, the Church has essentially adopted his teaching as her own.
There are those who maintain that the development of teaching that occurred under the pontificate of the blessed John Paul II -- in particular on the lawfulness of the death penalty, which St. Thomas considered a matter of a public authority killing a sinner for the sake of the common good -- constitutes a substantial change, such that executions and killing in warfare become subtypes of self-defense:
Figure 3. A Proposed, But Flawed, Interpretation of the Development of Church Teaching.
Not quite to-may-to, to-mah-to, since the claim is that the justification of both the death penalty and killing in warfare is the same as the justification of an individual killing an attacker in self-defense -- viz, double-effect reasoning, according to which only the saving of one's life is the intended effect and the slaying of the aggressor is the unintended effect, with only such force as is proportionate to self-defense being used.
This leads to the curious notion that a soldier may shoot an enemy soldier only if he does not intend to kill him, and the notion so ludicrous only an intellectual would believe it that an executioner may execute a criminal only if he does not intend to kill him.
UPDATED with a new caption for Figure 3, to make explicit my disapproval.