I say it starts on the ground. If you are assertive with him in the stable, by correcting every little unwanted movement and this can be taking a step forward when it was not asked for, you will then have the respect when you are riding.
I am a great one for poking! If a horse does anything little then it gets a poke with a finger - in the chest to get it to move back or, on the neck if it makes a face along with the word "Eh!"
I have a very fit horse here that will try it o every now and then. He decided that there were dragons and demons when I tried to go through a farm yard that he had been through many times. His thing is to plant and then run back. There are many issues with this horse and a big stick/getting angry puts him in battle mode so, I let him run back, turned him and made him go backwards past where he planted. Turned him and he ran back again so I did the same thing backed him further down the farm. The next time I turned him he walked forward for a few yards, saw something and thought about running back. I finger poke by his withers and firm leg, he decided it was not worth the hassle and immediately lowered his head, relaxed and walked on.
It is knowing your animal and his reaction to your commands that determines how you get past a problem.