Admittedly, in days of yore the supply of spirits was far too high, but it was always "cut". Even then it was mildly preferable and healthier to drinking the onboard water.
"The detestable practice of buggery" was specifically included as a capital offence under the "Articles of war", under which the Royal Navy was regulated, first written about 1650 and regularly reaffirmed for at least the next two centuries. You packed fudge, you swung for it. No exceptions.
Discipline in Nelson's Royal navy was savage by modern day standards, but it was scarcely worse than the contemporary civilian penal code, and it was heavily regulated. All punishments had to be entered in the log and justified later to higher authorities. Captains who were too fond of floggings would find themselves in trouble. A study of the logs makes it quite clear that most sailors were never flogged. It was actually uncommon. Usually the same old names crop up in the books time after time - the hard cases and the troublemakers.
Well, yes, but it does have a certain lyrical tone to it... ;-)