Proverbs 17:26 in the World English Bible
Also to punish the righteous is not good, nor to flog officials for their integrity.
Context
25 A foolish son is a grief to his father, and bitterness to her that bare him.
26 Also to punish the just is not good, nor to strike princes for equity.
27 He that hath knowledge spareth his words: and a man of understanding is of an excellent spirit.