EJ yes I have, however not for the reasons you stated. Growing up on a working Ranch and working around Livestock yes you will hit them to get them to move out of the way and behave.
Saddling an obstinate horse you have to drive yur knee into their gut to get them to release air so you can tighten a cinch. Old nags love bloating just to see you fall on your ass. Same with nippers who really do want a piece of your ass.
Cows, Milk cows are the worse because they angle to cow kick you whether you are milking them or not. Think bad bruise to broken leg when it happens. You smack their nose and get them to behave and settle down - NBD. BTW you cannot hit them with the force they use on each other. Beef cattle similar as you are moving them from pasture to pasture or moving them to the trucks for shipment
Dogs, we had indoor and outdoor dogs. If you have and overly aggressive one especially during calving season or when outsiders are visiting I have smacked them so they back off. We have only shot one overly aggressive dog on the ranch, usually the vet comes out and we put it down then and there. Usually with socialization and training we have never had a problem.
Cats I have never had a reason to hit one. No I do wish there are times they would stop bringing me "live" presents however. I do thank them and dispose of the "present"
“Better a true enemy than a false friend.”