in arabian magic it is mentioned that is possible to have a mystical union or even a partner - jinn- a female jinn-jinnya. Also in western magic it is known about the possibility of having sex with some spirits
but that would deplete you extremely.
I have sex with my spirits almost every day (Infernals, deities, my spirit companions) for a decade by now, and it
never depleted me. In fact, it does quite the opposite.
Whether a spirit sex drains you or not, it depends on many factor, and finding the right partner is crucial, just like with humans. If you chose an entity that has no bond to you, that possesses a more oppressing, selfish and predatory nature, you will get drained because the entity chose to drain you, and you failed to draw boundaries and protect yourself or demand enough energy in exchange.
For yes, sex is an energy exchange on every level, and if you have a partner who takes more than gives, or if the energy you gain is not the kind that's helpful and safe for you, it can have negative consequences. You have a saying in all of these, so let's not book spirit sex as something that will definitely deplete anyone.
There's a lot of benefits of having sex with spirits, if done right with the right ones, and it can damage you dearly if you are unprepared, let your guards down or driven by lust, not protected, balanced enough, and failed to draw lines and make them respected.