Although in the CEO's case, often no further harm is done, if half of a population has a massive increase in wealth while the other half does not then then poorer half must compete for limited resources with a group that will not only drive prices up but can now purchase assets as a form of rent seeking. So in fact, greater inequality acts as currency devaluation for the disadvantaged group.
The CEO example was not meant to cause unjustified envy but to show that according to your logic, instead of ever giving employees a raise you could simply give all raises to the CEO and tell employees that by cost benefit analysis the effect is the same, that they are better off.
To put it concretely, from now on, every time you ask for a raise just ask that your boss get that extra compensation instead. I think you will find the effect is not remotely the same.
Or from now on, ask for all of your pay check that exceeds poverty line for chances at a completely fair trillion dollar lottery.
Simple cost benefit multiplication is being erroneously applied in these cases (and often is)