Next time, if he won't move away from the trailer, dismount and see if you can get him moving from the ground, lunge him in circles and send him away from the trailer.
Or if you refuse to dismount, flex him. Bring his nose, kindly, to your knee. Flex him, left side, right side, left side, right side, back and forth. After a few repetitions, start his feet moving while you flex. Ask him to engage his hind end and yield his butt away when you bring his nose to your knee. If he doesn't want to leave the trailer, you make him work at the trailer, and relax off of him when he moves away. It's pressure release, and much more effective for both of you instead of painful punishment of his mouth.
If you need a punishment, open hand smack to the neck, shoulder, or rump will work. Or if you have long reins, a lead line, or crop. Don't whip him, but give him a good smack. Personally, I only resort to a spank or smack when they misbehave, like throwing a crow hop, buck, cow kick in response to a request. Refusing to move forward isn't necessarily misbehavior or deserving of punishment.