The idea of a "Mary Sue/Marty Stu" has changed for too much and isn't necessarily meant to be the "perfect" or "flawless" character they used to be. There are plenty of characters who are powerful, strong, never lose a fight, get all the lovers, etc. Being perfect may not necessarily make for an interesting character but it doesn't make it a bad character by default.
A Mary Sue to me, is a character who has obvious flaws but are never addressed and you take away the traits that make them unique, relatable and enjoyable. Some times it's not even about having flaws. A perfect character isn't bad, you shouldn't judge a character on their successes but instead..well on their character. If they show good and interesting personalities, who cares if they're flawless? They can be as perfect and god-like as they wish. As long as there's a sense of actual interest that makes them likable and relatable, that's fine.
So when you create a character, look at them and ask yourself, does the character feel off or flawed? If yes, is that flaw addressed?If not, you probably have a poorly written character. It doesn't have to be addressed directly, but it does have to be noted. Mary Sues often suffer from say personality issues that in most cases would ruin them, but in their story, is ignored.
Ask yourself, how does the character relate to the reader and to the story. Should the character be intended to be treated humanely or perhaps like Superman, is intended to be treated with a era of awe, wonder and practically divinity in some cases. Superman at times has basically been a force and how this force reacts to the more human world. Of course that's another flaw to Superman. On the outside he is basically a god-like figure living and trying to cope in an imperfect world.
Here's an interesting one. I'm not sure how many have read it, but for those who have read the "Incarnations of Immortality" you'll know what I'm talking about it. Near the end of the books, incarnations decide that they basically need to replace God and why? Because God at this point is literally so perfect that he can't comprehend the imperfections of the world around him. While God himself is flawless, the actions he has on world itself is flawed.