Wesley was my favorite Star Trek character, said no one ever.
Deanna, on the other hand ... uh, nevermind.
Montgomery Scott, though, there was a character. For us engineer types.
As to the Mary Sue thing, depending on how you look at it, aren’t most characters, at least protagonists, self-insert wish fulfillment characters?
I’ll pick on a few:
Retief
Miro Hetzel
Harry Potter
Lazarus Long
Cap’n Kirk
Buck Rogers
Telzey Amberdon
(tv) Col. Boyington
Thomas Magnum
James Bond
And many others.
I guess I don’t see what the big deal is. Movies and (many) books are about escapism, fantasy and wish-fulfillment. It just so happens that sometimes the author’s wishes don’t mesh up with ours. In which case, maybe it’s time to find another author/screenwriter.