The Messenger of Allah ﷺ was never given a choice between two matters except that he chose the easier of the two, as long as it was not sinful. If it was sinful, he would be the furthest of people from it. The Messenger of Allah ﷺ never took revenge for himself, except when the sanctity of Allah was violated.
ما خير رسول الله ﷺ بين أمرين إلا أخذ أيسرهما ما لم يكن إثما. فإن كان إثما كان أبعد الناس منه. وما انتقم و رسول الله ﷺ لنفسه إلا أن تنتهك حرمة الله عز وجل.
Malik narrated it in Husn Khuluq (2) from Ibn Shihab, from Urwa bin Zubayr, from Ayesha, and I have already mentioned it. Bukhari narrated it in Manaqib (3560) and Muslim in Fadail (2327), both through the route of Malik, with the same wording.Tirmidhi said, after citing the hadith of Abu Burda Ansari (1463), "The scholars have differed regarding disciplinary punishment, and the best thing narrated on disciplinary punishment is this hadith." Ahmad held to its apparent meaning, according to the well-known view attributed to him, while Malik and Shafii said, "It is permissible to exceed ten." See for more, Minna Kubra (7/404-410).The summary is that disciplinary punishment is proportionate to the gravity or triviality of the offense, and it may reach the level of execution if the corruption cannot be eliminated except by it. This is the preferred position of Sheikh Islam bin Taymiya, may Allah have mercy on him, because corruption keeps renewing itself and has no end.I say, examples of this are drug smugglers, those who rape girls, and those who promote prostitution.