You should probably narrow that since you're almost exclusively talking about the US market. There are a few pockets outside the US where you can earn that, it's just quite rare comparatively.
The US has anywhere from one to four million software developers, depending on your source. The BLS lists 1.2 million US software developers, with a $103,560 median pay (excludes benefits) in 2017.
You have closer to a 5% to 10% chance of earning $300,000 in total compensation as a software developer in the US, at some point in your career. Frequently high incomes don't last, there's a relatively high turnover because peak earning power only lasts so long, layoffs happen, specialization changes, job changes, et al.
The giant caveat to this, as everyone here knows, is you have a <1% chance of earning that outside of a small group of markets (ie it's very much not evenly distributed; if you're in New Orleans or El Paso you have almost a zero shot at it; if you're in SF or NY you have a legitimate shot at it).