No, touching your underwear is not a risk. I promise.
I know you are trying to get a handle on this and you are not alone in your worries. These are common questions and herpes is especially challenging for the person with OCD.
I am also not at all concerned about you touching discharge and getting this on your hands.
Keep trying, you can get past this with help from a therapist and medicine and maybe a little bit me.