Not to my knowledge, but now that I know his tells, I'm fairly certain it's something he has at least considered.
Basically, if he vehemently denies something, it means there's a 99.999999% chance that he has done it. If he insists he has done something, or that he holds a certain value or moral standard, there's a 99.999999% chance that he never did it, or that he has violated those values/standards in numerous ways.
So, knowing that, when I reflect on conversations where he - completely unprovoked and irrelevant to the conversation at hand - insisted he wasn't gay, I can safely assume that he may have at least had thoughts about it.
Let's just put it this way - I can no longer even count how many times my ex would make comments about people hiring escorts/sex workers - how desperate they must be, how much he looked down on them etc. It is pretty rampant in areas of the world where he has had to travel quite a bit for work, and he would make a point of bringing this up often. How his opinion of customers would go down significantly when he would find out about their involvement in this.
After DDay, I did a deep dive into our phone bills and found no less than 10 phone numbers that I could either link directly to escort services just by a quick Google search, or were Google voice numbers, that while didn't have direct links to any escort advertisements, are a well known way for women in that profession to communicate. So all of that virtue signaling was part of his ruse, a way to maintain his carefully constructed facade.
I'm with Dee, absolutely nothing would shock me at this point. It's also my understanding that it's fairly common among sex addicts to escalate to same sex encounters, even if they would not identify as gay. Something about having to up the risk/taboo factor in order to get the same high? It's not like same sex partners are a bad thing, it's just this is not like a person who might be bisexual or homosexual embracing their sexuality, it's an addict looking for a stronger high - super unhealthy shit.
I can grasp it on an intellectual level as a student of human nature and psychology, but I cannot personally fathom living with that level of dysfunction running rampant in my brain.
This actually triggered some memories - my XH was always trying to be sexual in super inappropriate situations, but had a hard time being even remotely physically affectionate in totally normal and appropriate situations.
For example, he would get super weird if I kissed him in front of our daughters (my step, his bio), even just a peck to say have a good day type of thing. Or holding hands, or hugging, like normal husband/wife affection. He said it made him uncomfortable to be affectionate like that in front of them.
BUT we would all be in the car on a road trip to see my family, and he would try to be "sneaky" and put his hand on my crotch while I was driving. Or we would be staying in a hotel in the same room, and he would try to have sex with me while they were sleeping. When I think about it, he clearly gets off on the idea that someone might be able to walk in or "catch" us in some way. The fact that I can directly tie it back to so many instances when his daughters were within earshot, and I was the one having to say no, that's inappropriate, just really shows how fucked up it all is. It's truly like he has some wires crossed.
Though he also had a bad habit of waiting until 3am when I was dead asleep and coming in to rub all over me. So maybe it has less to do with the "thrill" of potentially being caught, and more just his contrarianism and constantly needing to rebel against whatever is appropriate at that time.