IMO race horses are generally very happy and well looked after creatures.
There's nothing better than being at the peak of your physical fitness (from memory), and if a horse is unhappy, it will not perform.
If a horse comes out of a race streaming blood from excessive whipping, which does happen, then I'd say that this is barbaric.
However, most times, a horse only needs to be shown the whip to know that it's time to give all. Other times the jockey doesn't even touch the horse whilst going through the whipping motion, or he/she may only whip the horse very slightly. Lots of humans don't mind a slight whipping from time to time
As well, they get more holidays than you or I.
All they need to do is do what they love doing as best as they can.
If they don't love it, or if they're no good, well then they're dog meat