TBH, this is the first time in the last 14 years I noticed anyone connecting UC to sexual activity.
I would rather ask, do you have any other autoimmune conditions, esp. Lupus or Rheumatoid arthritis? If not, I would stay on top of my health.
UC is caused by proteobacteria overgrowth in most cases.
I would not use word 'cause'. The overgrowth of many bugs is observed in UC subjects but AFAIK, none are labeled as the cause. The overgrowth is strongly associated with symptoms worsening.