The Prophet ﷺ used to say, "Nobody should be flogged more than ten stripes except if he is guilty of a crime, the legal punishment of which is assigned by Allah." (Using translation from Bukhārī 6848)
أَنَّ رَسُولَ اللهِ ﷺ كَانَ يَقُولُ «لَا يُجْلَدُ فَوْقَ عَشْرِ جَلَدَاتٍ إِلَّا فِي حَدٍّ مِنْ حُدُودِ اللهِ»