This is an abbreviated post as I must go to dinner; I may write more later.
For questions like this one, semantics are important.
What does "teaching" mean?
What does "punishment" mean?
For the purpose of simplicity, I am going to use those words by definition of the dictionary.
Teach (verb): Show or explain to (someone) how to do something.
Punishment (noun): The infliction or imposition of a penalty as retribution for an offense.
Using those definitions, yes, you can use "punishment" to "teach" a horse. Horses do it to each other and we often do it to horses through the means of positive punishment, which is the addition (infliction) of an unpleasant stimulus.
This is a video of a mare using a kick (positive punishment) to teach her foal to yield when told.
Punishment is any stimulus that the horse finds unpleasant, which varies from horse to horse. Although physical punishment (by means of hitting, slapping, or otherwise striking) is something that everyone is familiar with and that all horses dislike, it does not have to be physical in that nature. For example, there is this one gelding that likes to stick his face in your face. This is not a bad thing but when uninvited, it can be invasive and rude. I simply blow a quick puff of air into his nose and he backs off. That is positive punishment, not abuse.