Back in the early days of mainstream(ish) erotic fiction, when Nexus and Black Lace were thriving, a lot of the books had a little note in the front along the lines of: this is fiction, in real life, don’t forget your condoms. It was thought, then, that including the use of a condom in any depiction of penetrative sex (whether vulva or anus was getting penetrated) would spoil the mood, or so it seemed. Though I definitely remember reading a Mills&Boon in about 1988 which made a euphemistic but unambiguous reference to the hero slipping one on before slipping it to the heroine.
Opinions are still a little divided about how much mention there should be of contraception or safer sex in erotic fiction. There are certainly authors who are working to actively eroticise sex with barrier methods, dental dams, condoms and gloves, but there are still plenty of sex scenes where not only is there no mention made of any such thing, but the wholly adult characters are still ever so surprised when the fantastic fuck results in a pregnancy.
(I don’t think there are any such stories which subsequently feature an abortion as plot point, but am willing to be informed otherwise.)
There are other potential health and safety concerns when it comes to writing erotica, though. If you’re going to include hardcore BDSM, should you include detailed instructions (and how much research is this going to add to your workload?) When I was writing Black Heart I wanted to include a scene where a couple play on a rack while they are at a fetish club: luckily for me I knew a maker of dungeon furniture who was willing to read that bit through and let me know if there were any ridiculous mistakes in it. Should you put a big Don’t Try This At Home message in a foreword? (Content warnings – information that something might be particularly upsetting to some individuals – are another matter.)
It’s probably worth emphasizing the distinction between works of fiction and books of sex advice. If you are in the business of advising other people how to do sex or kink or variations thereupon, then you really do need to fact-check, do your research, bear in mind the potential sensitivities of your target audience – and of people who are not quite the target audience but might find your work useful, unless you put them right off your potentially good advice by lazy insensitivity to the variety of potential readers there are out there.
You can’t get away with being a completely lazy bastard and taking zero responsibility when it comes to fiction, either. Sure, a story that inspires a reader to explore some aspect of sexual behaviour that they hadn’t even heard of before they read your book is not the same as an operating manual, and too much geeking out over the correct thickness of the ropes used or the precise construction of the whipping bench might bore people into giving up on your book, but mistakes made out of ignorance are not going to do you any favours. This is just as true when it comes to picking your locations, or your characters’ cultural backgrounds: if you don’t know much about another country or its people, either do your research properly and thoroughly, or stick to stories about people and places you already have a good working familiarity with.