The problem is not with egos, the problem is that they have a preconceived notion that they are equal with their coworkers, and then suddenly find out they are not.
Had the designation been clear from day one and each individual pay scale evolved over time publicly, I seriously doubt there'd be the same issues.
In essence, a reveal all at once is the equivalent of a massive swath of promotions to one's co-workers and not to yourself (for the lower paid), all in one day - yeah, of COURSE it's going to harm team dynamics. That doesn't mean we should only promote people in secret though, right?
Transparent compensation is simply a more granular hierarchy of representative productivity and value to a company, and the respective compensation, than a simple job title. We don't lose our minds at the idea that some employees are junior, others senior, etc. So what's substantially different with a more granular system to what already exists?
Any employee should be able to ask "Why is Bob making more than me?" the same way they might ask "Why was Bob promoted to XYZ position instead of me?" And a healthy company should be able to answer the question with the reasons why for the former, just as a healthy company can answer the latter. If an employee is lagging in salary over time because upper management isn't seeing the same value as their equally experienced co-workers, this should be made clear to that employee so that they can find out why their efforts aren't having as much value, and either adapt accordingly, or find an environment where their efforts will be better valued.
Imagine a classroom where each student can see their own grade as a number out of 100, but has no idea what the average is, spread, etc. You could have a C student who thinks they are doing as well as an A student, because they have no context for how they are being graded. Yes, there will be drama with each student knowing the other's grade, but they'll better know their own relative performances.
At very least, we should have anonymous compensation transparency, where employees can know where their own salary stands in the company compared to tokenized other salaries, so the conversation can at least be "Why is #335 making more than me?" instead of "Why is Bob making more than me?". In small firms/upper management levels this won't be all that anonymous, but it could mitigate the drama in larger employment pools while still providing the contextual benefit.