You have gotten a lot of good advice here, but I have also been on the receiving end of the “you (client) are easier to replace than (groom) so I suggest you figure it out” and I want to prepare you for that possibility, which sounds like it is what is making you afraid to speak up. I get it.
Do not try to learn some kind of methods to fight the guy as a solution. If you want to learn in general, great, but you are better off not ending up in that situation.
Figure out some kind of plan B for your horse if things go sideways. Knowing you have options is critical. That “but what about my horse” in the back of your head is always going to make it really hard to say something.
Just straight up stop speaking to the dude whatsoever. Don’t go to the barn when you’ll be alone with him, and if he approaches you around other people, just say loudly enough that other people hear it “I don’t want to talk today.” If he keeps talking, stare at him until he goes away. If he comes toward you, you can repeat yourself once, and then if he keeps it up, you leave. The emotional energy of guiding him toward the understanding of his wrongdoing is not on you, it’s unlikely to be successful, and it’s a lot of invested energy in human resources for a business that you are a customer of, not a manager for.
Tell your trainer that you are uncomfortable being alone at the barn with ______ based on some recent interactions. Say you need to work out a schedule where you don’t interact with him. Your trainer will react one of two ways: either with concern and immediate effort to approach the situation based on your needs, or by pushing back on that boundary ("well what did you say to make him ____? no one else has an issue? but he’s scheduled when you usually ride, I can’t reschedule him…) - if that latter reaction happens, congrats, you found an enabler and nothing you say to them is going to fix their approach to the situation either. You now know that this is the environment you are working within and you can continue to hold that boundary and stay there, if you still feel the benefits of the program outweigh the harassment/enabling (and I am not judging. Been there.) - you didn’t say anything bad about the employee, you just stated your needs, and that option remains available to you.
I really wish that the things people say you should do when harassed actually worked, but in my experience they just put the work onto the victim and someone who starts that behavior isn’t going to suddenly see the light because someone thoughtfully explained their point of view. If someone doesn’t believe you the first time you say you were harassed, all the explanations in the world won’t change their initial impression, and that energy is just going to make you feel worse that you even made it easy for them to understand and they still don’t.
That employee isn’t your friend. Offend him. Ignore him. Your job here is not to keep the peace. If other people get uncomfortable by your new boundary you are setting for yourself, good. It should be inconvenient and uncomfortable for them to have someone around who harasses women as well.