I moved the real JB from a 20 hour stalled situation (for almost 15 years), to a self-care situation with the goal of full time turnout. Fortunately it was right behind our new farm, and they were there while we were getting fencing and other stuff set up
I started with turning them out first thing early, then going back and bringing them in for breakfast, turning out after work and bringing in for dinner and the night.
Mornings turned into breakfast, me getting ready for work, turning out, and bringing in around lunch, then back out after work and back in for dinner.
It progressed from there
At first, JB was already ready to come in when I arrived, waiting at the gate. Then he would come to the gate only when he saw me. Then I had to go get him LOL
This was all made easier because it was November, so there wasn’t a grass acclimation issue, or a bug issue
Don’t let him train you. Like Beowulf said, horses often get excited or “anxious” out, when they are anticipating that there’s yummy food in the stall, not because they actually want to be in the stall or out of the pasture (not necessarily the same thing). Put him in his stall without his food (hay is fine), do some stuff, then feed. The goal being - don’t teach him that food is waiting for him the second he gets into his stall.
If he’s pacing or screaming or being stupid, hang out there with him, doing nothing, and the instant he stops his nonsense, praise and get him. Maybe do a little something on the way to the barn if he’s being a dink - work on whoa, or some basic yield to pressure, some very useful groundwork that should be ingrained (and usually isn’t), so there’s also no direct connection between leaving the pasture, and getting to the barn. If he’s polite and quiet no reason you can’t go straight to the barn. You dictate the speed of it all, not him.
“You” can mean literally you, or a trusted friend. As much time as it can be YOU, so you know it’s getting done, the better.