In 1976, Arthur Gilbert published a paper titled"Buggery and the British Navy, 1700-1861." Gilbert spent much time focusing on how the attitude toward homosexuality both ashore and at sea softened and hardened over the years, depending on the various challenges Britain faced. Putting that aside, Gilbert showed that besides desertion, buggery was the crime that was most often punished by execution. Gilbert would argue indirectly that it was a rare event (buggery), and when discovered, it was punished severely. From his article:
I'm not sure his data support that conclusion. I'm not sure there is data to support that conclusion. Cecil Adams wrote a derivative article on the topic, which is interesting.
I'm wondering if buggery wasn't much more widespread than we would otherwise believe. It seems to me that with social crimes like this, the punishments often get severe when things get out of hand. It would be possible that when it became a "problem", the Admiralty would crack down hard, just to make an example pour encourager les autres.