
This book is indeed a masterpiece of historical literature on flagellation: Flagellation and the Flagellants: A History of the Rod in All Countires From the Earliest Period to the Present Time by Reverend William M. Cooper (real name: James Glass Bertram). 544 pages.

As far as I could find out, the first edition is from 1870. I’ve found a wonderful “new edition, revised and corrected”, as it says on the title page, from 1896. I don’t know another book on flagellation which brings such a detailed history of the whip, going back until biblical times… I will just summarize its content in a few lines, so you can decide if it’s of interest for you - there are several editions available in antiquarian bookshops, old ones as well as more recent reprints.

Flagellation among the Jews / The rod in Egypt and Assyria
Flagellation among the Romans
Seems like the Roman ladies were exceptionally cruel - Cooper cites Juvenal who writes about women who is angry on her husband and lets it all out on her slaves: “Woe to her waiting woman: the dressing maids lay down their tunics, the errand slave is charged with having returned too late, the straps break on the back of some; others redden under the lash of the leather scourge, and others of the twisted parchment.”

Several chapthers about religious discipline, flagellation in monasteries and convents and in many religious orders (over 100 pages), among them a funny story about Cornelius Hadrien, a Franciscan monk from the 16th century: “In his sermons, Brother Cornelius touched freely on the sin of wordly lusts and their consequences, and by his insinuations awakened fears and scruples in the breasts of his fair hearers, till they naturally resorted to the confessional for counsel and instruction. Brother Cornelius was prepared with the necessary medicine.
For those who were neither young nor particularly handsome, he prescribed that they should diligently confess their temptations to their former clergymen, in order to obtain from them absolution.” The The young and pretty ones had to swear an oath “to keep secret the penance to be suffered”, and they “were required to appear before him in the confessional every month. Here they were to be particular in confessing to him all their unchaste thoughts, words, and actions, and these, he explained, could only be expiated by a course of private discipline and secret penance, applied and superintended by himself.” So they had to see him “in a house adjoining the convent”, and “when the devotees came for the first time (…), the mistress gave them a rod, with the injunction to carry it into the discipline room; but at the same time to remember to bring one for themselves on the next occasion.” … You can imagine what follows…

Penal Flagellation & Whipping in Prisons
Flagellation in Scotland
The Reputed Curative and Medicinal Powers of the Rod
Ubi stimulus, ibi affluxus
Flagellation in China

Flagellation among the Eastern Nations, esp in Russia, with amusing anecdotes on the ‘role-plays’ of Catherine II.: She forced her ladies of honour ” to dress themselves as children” and “chastised them in a truly maternal fashion!” Or she “acted as governess, and ordering her maids of honour to learn impossible lessons, she whipt them for not being perfect.” Followed by a chapter about The Knout.
Flagellation in Africa
Flagellation in America, and The Flogging of Slaves
Flagellation in France
The Rod in Germany and Holland
Military Flogging

Anecdotes of Domestic Flagellation in Foreign Countries and Anecdotes of Domestic Birch at Home
“Past five o’clock, hillo! maid sleeping beware,
Lest quickly your mistress uncover you bare:
Maids up, I beseech ye,
Lest mistress do breech ye!” 
(Tusser)
School Punishments
I think even the strictest contemporary pro-domme can’t keep up with this Suebian schoolmaster, who, “during his fifty-one years’ superintendence of a large school, had given 911,500 canings, 121,000 floggings, 209,000 custodes, 136,000 tips with the ruler, 10,200 boxes on the ear, 22,700 tasks by heart” and who made “700 boys stand on peas, 6000 kneel on a sharp edge of wood, 5000 wear the fool’s cap, and 1700 hold the rod.”
On the Whipping of Young Ladies, and an interesting chapter on the flogging letters in the periodical “Family Herald”
Instruments of Whipping

The book concludes with some chapters on Flogging Poems and Miscellaneous Flagellation, which is the only chapter on erotic flagellation…