^I can see the merits in saying that Evan Wilson is a Mary Sue by some definitions. But if so, she's proof that no trope is universally bad. Even a trope that's usually handled badly, like a Mary Sue, can be handled well. (Although since "Mary Sue" was coined as a term of disapproval, it seems contradictory to me to use the label for a character who works well.)
And no, I don't think she was designed to be a Mary Sue, since the book was written early enough that I don't think it would've been that meta. It might be better to say that Mary Sues were an extreme example of a type of character trope that existed in ST fan and pro fiction and found expression in books like Uhura's Song.
And "magical being?" No. Evan was painted as a trickster figure in the tradition of the mythic archetype that played a role in the story, but a strictly human example of a trickster. She was akin to the real-life Frank Abagnale, the basis for Leonardo di Caprio's character in the film Catch Me if You Can -- a con artist who was successful at assuming false identities and performing effectively in a variety of jobs despite having forged qualifications for them.
As for Piper in Dreadnought!/Battlestations!, I question whether she's strictly a Mary Sue either. Those books were sort of a prototypical attempt at the sort of thing that was later done with New Frontier, SCE, etc. -- an effort to tell a story set in the Trek universe but focusing on a different set of characters from the main cast. In another sense, it was a prototype of TNG's "Lower Decks," Babylon 5's "The View from the Gallery," or Stargate SG-1's "The Other Guys" -- or the play Rosenkrantz and Guildenstern Are Dead -- in that it shifted its viewpoint from the familiar main characters to the supernumeraries in the background. So instead of just having one character who "stole" the spotlight, the spotlight was shifted wholesale to focus on a whole new core cast that was intended as sort of a junior parallel to the core cast -- Piper:Kirk, Sarda:Spock, Merete:Bones, Scanner:Scotty.
And even though the viewpoint was on that new cast of characters, it was still Kirk and his crew who were the driving force in events. Piper and her bunch were dragged into what was happening, but they were several steps behind Kirk and Spock at every stage, constantly screwing up and needing to be rescued, needing to learn from the more experienced officers. Again, it wasn't about overshadowing the main cast, but about looking at them from a fresh perspective, showing how impressive they looked from the perspective of the ship's junior personnel.
So I don't think Piper counts as a Mary Sue in Dreadnought! She was just the lead character of a semi-spinoff focusing on the newest, youngest members of the Enterprise crew. However, the same can't be said for Battlestations!, because there, Piper has suddenly become a trusted member of Kirk's inner circle and been promoted to lieutenant commander just a month out of the Academy, and she plays a key role in saving the Federation from a second massive conspiracy just a month after doing it the first time. That is taking it a little far, and when you lose credibility, that's when you stray into Mary Sue territory.
OK, I misinterpreted the end with Dr. Wilson, and I thought it was going for a mythological trickster thing, rather than just a plain human example of one.