Baseball players are also likely to have a longer career, given that it's mostly standing around waiting for something to happen.
Kidding, of course. Kinda. ;)
I read an article once that posed the question, If you could choose to "go pro" in any sport -- hypothetical, of course -- which one is best? The author said baseball was the winner: While the possibility of injury certainly exists, it's not a contact sport like football, so you're less likely to end up with concussions, etc. Some baseball players are competitive on the field into their 40s, whereas the 20-somethings will always smoke the older guys on the basketball court -- so you have a greater chance of a longer career. Made sense to me.
Interesting (and a little odd) thought experiment there. I guess if you don't care about what sport you are playing baseball would be a good choice for earning money over a long time period with a minimal amount of lasting physical injuries. Within baseball perhaps the best job would be as a power-hitting outfielder.
OTOH, the median salary in the NBA is better, and high enough where (smartly managed) you could play only for a couple years and be rich for life, so who cares if you are out of the league by 29? I have no data on this, but I imagine retired NHL players are less 'noticed' in most major cities, so that could be good for anonymity (not being the typical 6'8" of an NBA pro might help you blend in a bit better too...).
I think it would be fun and profitable being a NASCAR driver - though the whole dying in a fireball puts a damper on it. Jury is still out about whether that can correctly be considered a 'sport'.
What about golf? If the question were "if you could be a star" instead of "if you could be a pro" then a compelling case could be made for being a pro-golfer. Careers that span decades, no contact/brain damage, and it doesn't even matter if you put on a few pounds. Then again, I don't really like playing golf....