I always wonder when I hear people bring up diversity in Star Wars movies today because things seemed so different in the 1970s, 80s, and 90s. Nobody complained about characters like Princess Leia, Ellen Ripley, Aunty Entity, or Sarah Connor (1990s version) when those movies were released but these days there is a contingent of people who complain incessantly when women are cast in roles. There are people who dislike Rey simply because she's a female character. We've seen many women harassed online including Kelly Tran (Rose Tico) and Leslie Jones (Ghostbusters remake) to such a degree that they've abandoned social media sites.
There are certainly legitimate reasons to dislike TFA and TLJ. I've got some problems especially with TLJ. But Rey is a Mary Sue is a weird argument to make. We're talking about a lady who grew up with a hardscrabble existence and no doubt made extensive use of her staff to fight on her own behalf. Within the context of a high fantasy setting like Star Wars I've got no problem with her being an awesome heroin. Hell, in TFA it took her and Finn both to beat Ren and that was after he had been shot by Chewbacca.
Social media didn't exist back then and certain segments online are cancer.
Those women are also organically popular and they are written different than Rey. Sarah Connor and Ripley both took a beating for example. They were also in original franchises that had no in universe expectations of how things are (they didn't have 6 movies before them establishing tropes). They also didn't have Kathleen Kennedy waltz around with shirts on them saying the force is female in a franchise where the majority of the fans are male and where the force is genderless. They also had interesting male characters people could relate to.
Consider things like Wonder Women, Black Panther, or the Orville. People seem to like those shows, they're diverse and they have power and interesting characters. For new stuff it can go either way.
Also consider if they remade Thelma and Louise but called it Ted and Bob and recast the two females as males and then made the female characters idiots (Hux, Poe, Kylo). Or they made a new Terminator movie and wrote Sarah Connor (played by Linda Hamilton) as a pacifist who was pro AI or something. Her character is almost a 180 over what people would expect. Sure characters can change but you probably need to see that on screen and have it happen naturally so to speak. Jaimie Lannister for example.
That is really the problem, taking older franchises that people like and then drastically changing them or perceived to be pushing a social agenda. If that is fair or not IDK but that is the way things are. Generally you go watch a movie for fun unless its something serious like Schindlers List. Even then social issues can still be enjoyable and make you think (see The Orville its great) but however you do it it still needs to be fun and clever.
Game of Thrones is also doing it right (GRR Martin is a feminist), it has a lot of great female characters heroes and villains, one of them is probably the most popular (Arya). Moana is another good example that movie was stupidly popular here in general and the Polynesians loved it. Orange the New Black also comes to mind. These shows/movies have great writing. A slight counter example might be Sense 8 which had a great season 1 but they messed up season 2 a bit IMHO.
Not all characters need a background or explanation. If someone is a Jedi, Sith, marine, soldier etc it kind of assumed they're a badass. Having them grow into it though is also an old trope (Sarah Connor T1 vs T2, Leia spoiled princess to rebel soldier). Sometimes movie makers mess up and the character you think would work out another one is more popular. Harley Quinn is sticking around (Robbie Margot), Jared Leto's joker is going bye bye. I don't think they deliberately aimed for that to happen and that is in a genre with a "toxic fanbase" but the female character is more popular probably because the male one was crap and Robbie was great.
Sure the 100% hard core extremists the ones harassing Rose's actor online you can't really save them. I suspect a few of them are young (under 30 or 20), and social media lets any idiot with an opinion express it, people might even vote for him. There is also other things going on like the cost of movies getting to the point a new movie is a massive risk financially and there is not a lot of 80's franchises with female leads. I would have had a female lad myself I would have fleshed out her back ground or just made her a Jedi or other force using tradition. Then if the force awakens she can still be the receptacle but she would already be a bad ass or she gets unleashed after training a bit with Luke. Even a simple passage of time thing could be used in a different TLJ there is a lot of things that could have been done.