I've only done it once, here's the best method I've seen:
https://www.theakforum.net/threads/how-the-hell-do-you-get-recoil-spring-back-on.105122/
"Try the ole straw trick .
since i was alone and no vice, i came up with an idea to re-install the recoil spring that took me less than a minute , the only tool i needed was a drinking straw , i used the ones that bend near the top (thinner than the milk shakes type).
i dont know whether this idea has been suggested before or not but it does work.
1. slide the straw over the spring retaining wire , all the way to the end of the wire, it should fit snuggly.
2. slide the recoil spring all the way in.
3. place the rear end of the top cover firmly on the table (preferrably on a non-skid pad or the wife will kill ya, lol) and using both hands grab the spring and push it down till it passes the top of the retaining wire(you can see it thru the straw). taking the next two pic was no easy task due to the pressure from the spring, luckily i kept it steady and it didnt fly away.
4. hold the spring firmly with your fingers (thumb, index ) while the remaining fingers (middle, ring and pinky) gripping the top cover, once that is done, release the other hand and pull up the straw, exposing the top of the wire.
5. with the free hand put the spring retainer piece on top of the wire to lock the spring in, easy way is to line up the two wire with the grooves on the side of the retainer piece and rotate the piece with your fingers and the wire will line up to locking position... note my fingers was turning purple due to it took longer than a minute to take pics. "
Unfortunately the thread is old and the links to his photos don't work. But the description is detailed enough to pull it off.