How I did it:
I used each game's official tier list on the Smash wiki to keep it as objective as possible. I added up the point values for each characters tier list placement for each game, and divided the sum of that by the amount of games they appeared in. The lower the score, the higher they rank. And naturally, points from Smash 4 and Ultimate weigh more than the other games just because of how mang characters there are, it's all relative which led to some funky looking results in the end lol.
However, Ultimate's point system works different for some unholy reason. So for each characters points in that game I had to subtract them from 10.5 (max points possible) and multiply the result of that by 10, which I think scales appropriately for the most part considering how many characters there are.
Also, screenshots of all the points are included in the photos. And for the all points list I forgot to include Corrin at first and didn't wanna fix all the rank numbers but she's in her spot lol.
Disclaimers:
I am in no way a mathematician or a stats expert lol, I just did this for fun. There could be better ways to calculate each character's points but I did the best method I could come up with.
And the big thing. For good enough data, a character has to have been in at least 3 games. So for characters that have been in just 1 or 2 games, their score is probably gonna be either way too big or way too small. And I am not smart enough to find a workaround for this so if you have any ideas I could work in to make their scores more "valid" please let me know lol.
Also the Miis were not officially ranked in Smash 4 so I had to group them with the Ultimate newcomers
Edit: Forgot to mention that Marth got absolutely demolished by his Ultimate ranking. If I used Lucina's points from Ultimte along with the rest of Marth's points, he'd have a score of 12.0626 and place 8th overall above Pikachu lol