To fully understand this line, one needs to look at the context in which it is used. Firstly, the poet, Jonathan Swift, was an Anglo-Irish satirist during the late 1600s and early 1700s. He is most famous for Gulliver's Travels, in which he mocked all forms of political and government institutions and conventions.
Swift was merciless in his satire and would often use disgusting and shocking images in his writing to make his point. He was often criticized for being revolting, but he believed in saying it as it is and made no apologies for his stance and his style of writing.
"The Lady's Dressing Room" follows the style of satire that was Swift's trademark. The poem mocks the idea of beauty, suggesting that it is an illusion, as the unfortunate Strephon discovers when he decides to snoop on his mistress's bedchamber to gain some insight into her private affairs.
What Strephon discovers is quite disgusting. Throughout the poem, he makes one revolting discovery after the other. He is utterly disconcerted and cannot believe that his fair maiden, Celia, could follow such shockingly nauseating habits to maintain her looks. Every one of her personal items revolts him, and he is sick to his stomach on seeing the filth in her belongings and her room.
The poem gradually builds to a climax as Strephon's prying leads him to more discoveries, each one more nauseating than the one before. It is at the end of stanza four that we read these lines:
O never may such vile machine
Be once in Celia’s chamber seen!
O may she better learn to keep
Those “secrets of the hoary deep!”
Strephon has, throughout the poem, wished that he does not find anything worse than what he has already seen. When he opens a chest, however, he is overwhelmed by the stench emanating from it. He hopes it is not something really terrible (such as a rotting corpse). It is in this context that these lines are used.
Strephon fervently hopes Celia has not kept a 'vile machine' in her room. The 'machine' is a chamber pot and Strephon hopes she does not have one. He hopes that she has had the forethought to keep her most repulsive habit hidden. The 'secrets of the hoary deep' refers to something that comes out of the darkness and is very old. It is a metaphor
for the chamber pot and its contents. The last thing Strephon wants to see is old remnants of what had passed through Celia's intestinal tract.
The phrase, 'secrets of the hoary deep' is a direct quote from John Milton's epic biblical poem, Paradise Lost, in which he explores man's fall from grace. In the poem, the characters are faced by a horrendous sight:
Before their eyes in sudden view appear
The secrets of the hoary deep, a dark
Illimitable ocean without bound,
Without dimension, where length, breadth, and height,
And time and place are lost...
Swift clearly exaggerates the extent of what Strephon fears to see by deliberately using this quote. Unfortunately, our supposed victim is not so lucky and the end of stanza five clearly indicates his horrified disgust. Everything he has discovered makes him see women in a totally different way, since he is reminded of the stench he has been exposed to whenever he looks at them.
Swift, however, advises that he should ignore this and be as he (Swift) is. He should continue enjoying the company and friendship of women anyway, for:
Such order from confusion sprung,
Such gaudy tulips raised from dung.