Intercourse is the most straightforward/obvious sexual act, but what "sex" involves is a much wider concept than copulation.
Buddhism teaches us to acknowledge meaningful differences. For example, actions are divided into mental, verbal and physical. We are taught to stop evil at its subtlest form (thought), and if we cannot, then verbal (speech), and if we cannot, then at the physical level.
On the other hand, and as our battle is against self-deception, we avoid grey areas where evil can take the form of fake virtues:
Rain soddens what's covered
& doesn't sodden what's exposed.
So open up what's covered up,
so that it won't get soddened by the rain.
Indeed, the path that leads to worldly gain is one and the Path that leads to Nibbana is another. Fully comprehending this, the bhikkhu, the disciple of the Buddha, should not take delight in worldly gain and honour, but devote himself to solitude, detachment and the realization of Nibbana.
For most of us, the path to Nibanna is too far fetched. The alternative is to side with merit and develop harmlessness as much as we can.
And the Blessed One addressed the bhikkhus, saying: "Behold now, bhikkhus, I exhort you: All compounded things are subject to vanish. Strive with earnestness!"
This was the last word of the Tathagata.