The very best way to write a Mary Sue story is to proclaim it a parody so that readers know you're above that kind of shoddy writing. Then you can do absolutely anything you want with both character and story and be considered witty and intelligent, because you're allegedly not taking it seriously nor are the readers. Who's then to accuse the author her/himself of self-insertion or therapeutic writing?! Best of both worlds!
__________________
'Mercy!' cried Gandalf. 'If the giving of information is to be the cure of your inquisitiveness, I shall spend all the rest of my days in answering you. What more do you want to know?' 'The whole history of Middle-earth..
.'