Though keep in mind that horses poop more under stress. Ours all let go the minute they get in the trailer even though they load and trailer well. So if something stressful occurs during the visit you may get nervous poop.
I think you could do a lot with clicker training but I would never trust a horse to be 100 % house trained like a cat or dog. That’s because horses, like rabbits and birds, really don’t personally care about where the poop. Well, my mare always poops at the back of the runout paddock not in her stall. But if I locked her in the stall she would poop there, not wait.
Cats and dogs on the other hand poop less than horses, and have more personal rules about pooping away from food and traffic, and cats bury their poop. So there is more instinct to build on.
Just like it’s easier to teach a dog to play fetch than a horse.
So you might not ever be 100% reliable.
On the other hand horses can and do hold their pee until they are in a safe and absorbent place.