My horse has never bitten me...and I never restrain him or tie him to anything, sexual situation or otherwise. There are specific reasons why a horse will bite. Among them: being frustrated or aggressive, and I never give him a reason to be either of those, of course. Another can be a reaction to a saddle being too tight in the girth or otherwise uncomfortable. The main cause of biting, as I was taught, is if you've gotten him used to hand feeding, as with treats. Not because of bites while taking it from you, but it's when you go to him without a treat, and that is not due to anger.
Thanks to you, he feels very entitled to that treat. There is nothing wrong with healthy treats! But they should never come from your hand for the reasons just stated. He may bite or pull at your clothes, pockets or hands, arms, etc. looking for food, not intending to hurt you, but without knowing he might.