The phrase has a Dutch equivalent: ‘de eindjes aan elkaar knopen’ or ‘tying the ends together’. The two expressions may be totally unrelated of course, but this version seems to argue in favour of a strings or ribbons metaphor.

The mention of stays and petticoats calls to mind Pope, writing a couple or so decades before (in one of the Imitations of Horace, I don’t remember which)

But if to charms more latent you pretend
What lines encompass and what works defend!
Dangers on dangers, obstacles by dozens,
Spies, guardians, guests, old women, aunts and cousins.
Could you directly to their person go
Stays will obstruct above and hoops below,
And if the dame says yes, the dress says no!

The last line always reminds me of the fiendish brassiere snap, designed to frustrate the hopes and dreams of thousands upon thousands of adolescent males.