One thing, is don't get overhorsed, don't think because you can ride old Dobbin, that you can ride Widowmaker as easily.
PAY ATTENTION when you are riding. You wouldn't let your attention wander when you are on the Interstate, so don't do it on a horse.
Learn what is going on with your horse before it does something. Watch its ears. One forward and the other back? Horse is contemplating something, and is checking out to see if you are watching. Like a kid stealing cookies.
Learn to feel with the seat of your pants what the horse is thinking. Horse is getting light up under you? What has it noticed? Horse doesn't feel "all there" in its mind? Why?
Look ahead on the trail, if your horse is a drifter, generally because you aren't riding with purpose? Then watch for it to drift near a tree, so that you have to shift over to avoid being scraped off.
Instead of thinking about punishing your horse? Think about ways to become the best horseperson you can be, in every way.
That way, when something begins to happen? You will know how to deal with, and fix it then.
Horses make me a better person.