Either you have a FANG wage or your friend has a poverty wage because here's how it's in Austria SW Dev wage 3k net/month, bus driver 2,5k. There's no 6x difference here.
So you're proving my point that it works for you when income distribution is not egalitarian because you wouldn't be very happy if you earned the same as your friend.
Sorry, but something is wrong here. Either you're data/math is wrong, or you and your friends work in the top 1% FAANGs/big-tech jobs, because those tech salaries aren't the norm in Europe.
My loose impression is the median for regular SWEs in Germany is around 60k and for senior positions ca 80k. Whether this is demotivating or otherwise is a matter of personal attitude I think - the difference is not enormous but it is there.