First of all thank you for this highly interesting and not at all currently relevant question!
Before we begin there's a couple of things we need to understand about 17 and 18th century pornography. It doesn't look like pornography to the modern eye because it came from a very different place and was trying to do very different things. Seventeenth and eighteenth-century pornographic works, less so 19th century, were usually written to make fun of people in power. For example, it usually made fun of the Pope or a king or another politician or social figure. Erotic work in those times we're much more focused on satire. As a result those works were often banned by those people in power. For example, the Pope in the Catholic Church created the Index of Prohibited Books as early at the 16th century. In England and France you start to see obscene libel laws that targeted authors that wrote this kind of material by the 17th and 18th centuries.
With that said, any time something gets banned or prohibited there is a large increase in interest and collection of it and that especially applies to people in power. The best-known example from the 18th century is probably John Wilkes and the Hellfire club. The Hellfire club is notorious for all sorts of reasons, which I won't necessarily go into detail here as it's not relevant to the question. The long and short of it is that Francis Dashwood liked to have libertine parties in the woods, about a days ride from London, and he founded the Monks of Mendemham Abbey (known as the Hellfire Club) to do so.
The Club was essentially a group of upper middle and upper-class men who got together to drink heavily, have pretend satanic rituals and cavort with their mistresses. It included many of the leading politicians of the day, such as Lord Sandwich (the inventor of the sandwich, yes), who would be the right hand man of the Prime Minister and Lord Admiral, and other such as Henry Vanissart who would lead the East India Company. As a part of their cavorting, they also liked to read what they considered pornographic material at the dinner table. This included such mainstays as Aretinos works, or the poems of Rablais, but it also included work they themselves created such as The Essay On Woman.
The Essay on Women was a satire of the highest sort against Alexander Pope’s Essay on Man. While the Essay is not a pornographic work in the modern sense, it targeted and criticized the pretentious morality of Pope line by line. Where the first stanza of Pope runs
Awake, my St. John! leave all meaner things
To low ambition, and the pride of kings.
Let us (since life can little more supply
Than just to look about us and to die)
Expatiate free o'er all this scene of man;
A mighty maze! but not without a plan;
A wild, where weeds and flow'rs promiscuous shoot;
Or garden, tempting with forbidden fruit.
The Essay on Woman runs
Awake, my Fanny, leave all meaner things
This morn shall prove what rapture swiving [fucking] brings.
Let us (since life can little more supply
Than just a few good Fucks, and then we die)
Expiate [Cum] free o’er that lov’d scene of Man;
A mighty Maze! for mighty Pricks to scan;
A wild, where Paphian thorns promiscuous shoot,
Where flow’rs the monthly Rose, but yields no Fruit.
While usually credited to John Wilkes, the Essay was largely a production of the minor-politician Thomas Potter, another unrepentant Hellfire rake. Wilkes seems to have had some input into the poem, but he was more involved in the printing and distribution of the poem to the Hellfire members.
While in most cases this material would have been privately printed and distributed, Wilkes however, was one of the biggest populists of the time, and specialized in firing off incendiary tweets pamphlets that antagonized and insulted the current British government. George III and the Tory government, already deeply suspicious of and outraged at Wilkes for his political criticism in North Briton issued a highly-controversial general warrant for Wilkes’ and his publishers, whereupon The Essay On Women was found. The result was one of the strangest moments in history where one Hellfire Club member read a pornographic poem into the parliamentary record in order to charge another Hellfire Member with obscene libel and insulting a Bishop. Wilkes was forced to flee to Paris for his safety for couple years before returning to England and being elected back into the House by a public that loved him. Wilkes and Liberty was their chant--and Wilkes-Barre in the US State of Pennslyvania is partially named after him.
Later British politicians would manage to avoid the harsh glare of the public light that the essay on woman resulted in. But as the works became more recognizably pornographic to modern eyes, there still remained a huge interest in collecting, creating and commenting on all the killer material under the zodiac. In fact, some leading British politicians belonged to another secretive club, the Cannibal Club, and helped enable the spread of pornography throughout England. As none of them are exactly within the purveiw of this question (getting caught) I will offer some brief sketches:
For there's a fair this afternoon, I know,
To which my pupils are forbid to go;
But to which most will hasten all the same —
To my great profit in the flogging game.
Some pedagogues are only strict for books;
My bottoms blush for manners, words, and looks —
Nothing a gentleman's demeanour teaches
More than a graceful downfall of the breeches.
Does a boy giggle? birch him till he's grave;
Won't sting? a rod will soon bring out a stave;
Won't eat? excite him with some strong birch tea;
Is greedy? make his b — m a fricassee;
Wants purging? bleeding will relieve his guts;
Breaks wind? just break his skin with fifty cuts;
Wants — or has — spirit? keep to the same plan —
Till the child learns the endurance of the man;
For the brave youth who owns the double grace,
A pouting bottom and a cheerful face,
And licks the milksop who, unused to pain,
Dares hardly raise his fist to strike again,
Wins from my favour many a pleasant boon
Refused to the insipid lead poltroon —
Whom I rejoice to see his comrade dogging,
To kick the hinder part I've just been flogging. (p. 20)
Frederick Alers Hankey was an English banker and Conservative politician who sat in the House of Commons from 1885 to 1892. Even the debauched members of the Cannibal Club found his behaivor especially disturbing--along with having a superb collection of de Sade he also requested Richard Francis Burton to get the skin of an african girl so he could bind his copies of de Sade in skin.
Sir Richard Francis Burton, the famous adventurer and translator, also lesser known as the translator of The Perfumed Garden, the Kama Sutra, and 1001 Arabian Nights -- all heavily erotic works that he managed to get published in England and narrowly escaped capture and prosecution for several times.
It is worth noting, by the by, that all of the Hellfire and Cannibal Club members were conservative Tories. I don't have any particular insight as to what attracted conservative politicians to this material, but there you go.
Works Consulted
Walpole, Horace. Memoirs of the Reign of King George III. Ed. Derek Jarrett. New Haven: Yale UP, 2000. Print.
Wilkes, John, 1725-1797. The Correspondence of the Late John Wilkes: With His Friends, Printed From the Original Manuscripts In Which Are Introduced Memoirs of His Life. London: Printed for R. Phillips, 1805, Volume 3, p. 60-84.
See also Cash, Arthur. John Wilkes: the Scandalous Father of Civil Liberty. Yale University Press, 2008, p. 33-35.
Wilkes, John, qtd in Hamilton, Adrian. The Infamous Essay on Woman: Or, John Wilkes Seated Between Vice and Virtue. Deutsch, 1972
Tosh, John. Manliness and Masculinities in Nineteenth-Century Britain. Pearson Longman, 2005, p. 61-82.
Also, Doror Wahrman, The Making of the Modern Self. Yale University Press, 2004.
Mason, Michael. The Making of Victorian Sexuality. Oxford: Oxford University Press, 1994, p. 17.
Lutz, Deborah. Pleasure Bound: Victorian Sex Rebels and the New Eroticism. Norton & Company, 2011
/u/AnnalsPornographie has a good and comprehensive answer, but I have a few miscellaneous things to add about pornography in the early part of the long eighteenth century. This isn't necessarily about politicians being caught with pornography, but I certainly have a few anecdotes of political figures having relationships with pornography.
The most famous British pornographer of the late seventeenth century I would argue is John Wimot, Second Earl of Rochester. He's a canonical poet now; Johnny Depp played him in The Libertine. He's known for bawdy and carnivalesque satires against the ruling class (of which he was a bawdy and carnivalesque member). Have a few quatrains from On Mrs Willis
Bawdy in thoughts, precise in Words,
Ill natur'd though a Whore,
Her Belly is a Bagg of Turds,
And her Cunt a Common shore.
One of my favourites of his, A Ramble in St. James's Park features a public orgy including Lords, Ladies, Poets, Drudges &c, a fancy lady having a threesome with a handful of courtly buffoons, and an "Antient Pict" who would "frigg upon his mother's face." I could provide a longer argument as to why I say this, but that "Pict" is a proxy for King Charles II - all of this fulfils the already-noted role that "pornography" played in undermining the authority of the ruling class. Rochester, and courtly satirists like him, would produce and/or commission manuscript copies of these poems and make sure that they'd circulate in places where they'd create a fuss - at court, in theatres, and the like. Harold Love's Scribal Publication in Seventeenth-Century England is a wonderful and solid book about how these "separates" circulated.
Here comes the first anecdote - Rochester had a reputation for producing this stuff and carrying it around with him. King Charles II was a fan of bawdy fun too. I'll let Harold Love's endnote take the rest:
In The Isle of Brittain. These outrageous lines on Charles II were written in late 1673 at a time when Rochester’s disgraced friend and political patron Buckingham, had moved into open opposition to the king’s pro-French policies .... During the Christmas celebrations at court, Rochester, short-sighted and probably drunk accidentally handed a copy of the poem to the king.
Whoops. This particular poem goes on at length about the King’s penis, which “laborious Nelly” (i.e. Nell Gwynn, the famous actress and royal mistress and if I remember right great great .... great grandmother of Prince William) uses as a sceptre to rule the land. Rochester ended up exiled from court and out of favour for about a year – exile from court is more or less the equivalent of house arrest, as nobody of consequence or standing would have anything to do with him lest they too fall out of favour. For a cosmopolitan fellow such as Rochester, this was not a mild punishment. There is no doubt that anyone other than a peer would have ended up in prison.
Next anecdote – much shorter. Pepys records, in a 1680 letter (not in his diary - Samuel Pepys, “S. Pepys to William Hewer,” in Letters and the Second Diary of Samuel Pepys, ed. R. G. Howarth (London and Toronto: J. M. Dent and Sons, 1932), 105.) having encountered what we now know to be the first print collection of Rochester’s poetry (Pepys’ copy survives!) Pepys actually kept the book locked in his desk at work, because was concerned that Rochester’s work – while witty – was unfit to mix with his more dignified books. In other words Pepys, by now Secretary of the Admirality, was worried about being caught with the pornographic and politically incendiary volume.
Last one. Pepys also encountered a book he identifies as “L’escholle des filles,” which goes by the English title The School of Venus. Here’s his account:
Thence homeward by coach and stopped at Martin’s, my bookseller, where I saw the French book which I did think to have had for my wife to translate, called “L’escholle des filles,” but when I come to look in it, it is the most bawdy, lewd book that ever I saw, rather worse than “Putana errante,” so that I was ashamed of reading in it (13 Jan, 1667/8)
This book is of the genre of a “whore dialogue” and it’s much more similar to modern literary erotica than most of the other satires that have been discussed in this thread. It’s also weird, including a story of a young woman who builds a statue with a gigantic phallus and some kind of pumping mechanism which allows it to ejaculate into her. Pepys puts the book aside for about a month:
First, on a Saturday night:
Thence away to the Strand, to my bookseller’s, and there staid an hour, and bought the idle, rogueish book, “L’escholle des filles;” which I have bought in plain binding, avoiding the buying of it better bound, because I resolve, as soon as I have read it, to burn it, that it may not stand in the list of books, nor among them, to disgrace them if it should be found. (8 Feb 1667/8)
And the following Sunday:
where I did read through “L’escholle des filles,” a lewd book, but what do no wrong once to read for information sake … And after I had done it I burned it, that it might not be among my books to my shame, and so at night to supper and to bed. (Feb 9 1667/8)
This is interesting, because of that ellipsis left by pepysdiary.com (who wants to manually transcribe, right?) Here’s the full passage from the Bell edition, which is within reach:
a lewd book, but what doth me no wrong to read for information sake (but it did hazer my prick para stand all the while, and una vez to decharger); and after I had done it, I had burned it
It’s neat that the internet version censored that passage. Just to be open about this, Pepys masturbates until completion while reading the book, and then burns it. It’s downright fascinating that he rationalizes reading erotica even in his coded private diary (“for information sake”) and that he destroys the book in shame. Pepys certainly didn’t want to be caught with this book, though I wonder about the reputation of the bookseller who provided it to him.
I hope that you find these a nice addition to the first post in the thread!