A curse word toward the sacred is blasphemy, but the same curse word toward evil is not (which the Church did by pronouncing anathemas).Producing a fake passport is a form of perjury, but producing the same fake passports and baptismal certificates to Jews fleeing the Nazi is not (which the Church did during WWII).
Although under no circumstance can one commit blasphemy, perjury, murder and adultery, it is also a certain context that defines the same actions as something other than blasphemy, perjury, murder and adultery.
As illustrated, the evil ‘acts’ as referred to in the Catechism contain an inherent context, while the circumstances that tempt those acts pertain to the external climate.
It is indeed right to inflict a just amount of force and punishment to those who by their behaviour, necessitate the force and punishment levied upon them.
Not only is it right, it is a “grave duty” as per the Catechism.
The same action of stabbing someone to death could be murder in one context, but self defense in another.
The same action of engaging in a sexual embrace can be adultery in one context, but a blessed marital act in another.One may not do evil so that good may result from it.So, does it mean it is wrong for a police officer to carry tools of torture such as a baton, pepper spray, taser and firearm?Air raids over cities populated by non-combatants would be another example of an evil means toward a good end, despite the desperate circumstance of war.In these examples, the punishment is disproportionate to the crime and innocent people are deliberately being used as disposable pawns.Fruit of modernism Imagine a Catholic theologian condemning police undercover work, misapplying the argument that “one may not do evil so that good may result from it”, and opining that no Christian can support underhanded tactics.Imagine this theologian labeling a police payment to a mafia informant as ‘corruption’, because such would be the term if the payment was the other way around.However, if the same actions of breaking, choking and beating are required to learn how to disarm a ticking time bomb, some people tack onto those actions the label of “torture” and “intrinsic evil”.This is arbitrary labeling and must be avoided by any catholic purporting to represent Church teaching!In other words, the inherent context does justify certain actions, even to the point of making said actions into good acts, whereas it is the external climate that doesn’t justify.Catholic Answers apologist, Jimmy Akin, explains the same in greater detail in his blog on intrinsic evil the example of an officer inflicting pain to apprehend a violent suspect, it isn’t that the end justifies the evil means, but rather, the means isn’t even evil to begin with.