Do as much riding as possible out of the ring.
Finish up in the ring.
Always quit in the corner farthest from the gate.
Always dismount there, but NOT the first time you stop and rest there.
Unbridle, put on halter and loosen girth there.
Leave tied there if at all possible.
Buy a 'feed bag' that goes on the horse's head and holds a small amount of grain and feed the horse there after he is rested and completely settled.
Any time you use a predictable routine, horses learn that routine and get anxious or irritated when they THINK they know what should come next. Sometimes it gets pretty difficult to change up their routine enough to keep them guessing.
One thing that works very well to keep show horses and lesson horses from wanting out of the arena is to lead them out (or ride them out in a show situation) and work them harder on the outside somewhere than they worked in the arena. Then, stand around and rest the horse out there somewhere before you dismount, loosen girth and lead back to the trailer or stall. If you want horse to get 'show ring sour', just ride out of a class and ride straight to the trailer or the horse's stall. You can get one to want out of that arena in a hurry.