You don't need to "jump to another CEO role" to continue to be fabulously wealthy.
Failing spectacularly as a CEO often does nothing to impact your employability for future roles.
https://en.wikipedia.org/wiki/Tony_Hayward
Or Carly Fiorina or loads of others we could sit here and review if we were so inclined.
There is, ultimately, no justification for the compensation CEOs receive. They don't deserve it. They haven't earned it. And often their actions are degrading to the company they are hired for, yet they still get paid exorbitant amounts and go on to other positions of responsibility and high compensation.
As to pay, generally CEO's can find a high paying job easily. They simply don't need to.
Additionally the compensation is so great that I think a lot of people would gladly take that risk given the opportunity. If in a few months you can earn a x years engineer's salary why not take the risk and then worst case is a nice holiday whilst looking for the next company to ruin.
I think your point holds better at middle management level.
Again, the obscene compensation exceeds the risk. Even going back to a VP position somewhere is still lucrative.
Let's use software engineers as an example. You make a mistake.. it's unlikely you get fired, and even more unlikely that it ruins your career. Most likely, it results in better practices and a post mortem. And even if you do leave, there will be hundreds of job openings for a competent engineer.
It's different for CEOs, even competent ones. One moderately bad decision (or to your point, a little bad luck) can result in a "change of management." And it's non-trivial to just jump into another CEO role.
And that's not even taking into account other aspects such as supply & demand, accountability, stress levels, etc.
Is the comp "fair"? I have no idea. I don't even know how you would evaluate fairness in that regard.