First off, have you left the trailer in his paddock with feed in it, for him to explore on his own?
As for what work you've done with him, has he been taught to yield to halter & other pressure? Been taught to drive or lunge yet? I'd do all that first. I'd also include gradual desensitisation to other 'scaries', so he gains trust in you that despite how scary something is, he can trust you & you won't force it on him.
I use a method of gradual desensitisation, so it can remain low key, low stress and I can retain - & build on - the trust I've worked on. You can then lead or lunge the horse near the trailer, within his comfort zone, then *a bit* closer & ensure to reinforce him for the smallest 'tries'. Get him confident about the new proximity, with repetition, before going a bit closer, so that he has to walk over the tailgate or put a foot inside or such. Again, reinforce that & don't ask for more until he's confident doing that. Next step could be 2 feet in, etc.
As part of each step, I also teach the horse, once he's used to being in that position anyway, to stand there & not walk/back away without my say so. I do this by asking him to stand and dropping all pressure (negatively reinforcing) while he's there - preferrably positively reinforce with food treats or such as well. I ask for a very short time to begin with, so I can ask him to move off before he chooses to himself - make the Right thing as easy as possible, so you have the most opportunity for reinforcing Good behaviour and less time practicing Wrong stuff. If/when the horse does decide to move, I don't try to prevent him, but make it a little difficult for him. Eg. keep a little pressure on the rope and tap behind him with a whip or rope. The second he stops, drop that pressure & reward him, then ask him to come forward again.
BUT with regard to backing out, be aware of his emotions & try not to 'raise the bar' too quickly. If you find he's too reactive, I wouldn't try to punish him at all for reacting with self preservation, but take it as a sign you're moving a little too fast for him.
Working in short sessions is also helpful, to avoid the build up of stress.