anytime a horse gets nervous, that is the perfect time to put it to work. Get his brain back to what you are thinking and want to do instead of what can eat him on the trail. Trees make great training aids, circle them till he wants to act right. He will eventually get the idea.....grow up and act right, or work really hard
horses are not capable of that kind of thinking, "grow up and act right or work hard".
If you utilize a tree to turn a hrose around, you are just getting the horse's mind off of the thing it was on. And, the act of bending, in particular of stepping under the body with the hind end, will help to encourage a release of tension in the horse's body. But, to think of it as a punishment will not help a hrose who is afraid.
Better will be to keep him busy, mentally and physically, BEFORE he ever spooks. Keep him really occupied, serpenteeing down the trail, stopping, backing, bending and sidepassing each direction, disengaging his hind and turning around. All kinds of things, and lots more where there's a bend in his body, so he never gets really stiff in one line , (which is a preperation for bolting).
IF he starts to bolt away from something, turn his head toward the object. Don't force him to go up and sniff it, but don't let him turn his back to it and bolt off. You have to catch him quickly if he starts to run off from something, and bring his head around and disengage his hind.
He is not allowed to "dash" by something out of fear. If it's a very light kind of "speed up" to pass something, then see if you can just move with him, without leaning forward and encouraging a bolt. But, if he starts to really scoot past something , then take the INSIDE rein (near the scary thing) and lift up, straight up, and get him bent around to face that thing. If he walks on bent toward it, but at a reasonable walk, that's ok. But NO running off from it.
When you get past the scary thing , that's when you talk soothingly, not before. Pet him, tell him how brave he is, give him some more rein and let him stretch out from the reins a bit.
Your confidence , or lack thereof, will totally affect his confidence, and viceversa. I know how hard it is to not be afraid if you ride a spooky horse. Keeping him busy will help both of you.