Not a mother but a dad. My advice and what I have always followed: Just don't do it with kids or partner at home. Arrange for a night alone, encourage partner to go away to friends and preferably sleep there, and for the kids to have a sleepover with friends or fam. And then when you are all alone with doors locked and all you can have your you-time with the doggo.
If kids are at school and partner at work is also an option, but its more fun to have the whole night.
Never risk kids or partner walking in on you. It will fuck up your life beyond repair and nothing is worth losing your family over.