Is there anything to be done when a department has hot young assistant professors with much stronger research records (in books and peer-reviewed publications) than the associate professors? Must the assistant professors just accept that they are less well ranked and less well paid than associates who have been less productive?
Position in a university, and consequently salary, is not simply a function of being "hot and young", grant funding, and publications. But there are many other factors you may be missing. For example, the associate professors in your department may be teaching larger classes (under the assumption that the department tries to give the assistants smaller classes while they build a resume for their tenure decision); they may also, with more experience, be better teachers. And they will almost certainly have far higher service loads -- sitting on committees, mentoring, reviewing duties, etc. All of these are things that are valuable to a department and that is worth a certain amount of salary. But it's hardly visible from the outside, even though it definitely diminishes your ability to do research and publish a lot.
Finally, the associate professors have one less promotion to look forward to, and consequently a lower salary potential. For example, an assistant professor paid 5% less than an associate will earn 5% more after promotion, which translates into a quite significant sum over the remaining work life.
I do get your point, and there definitely are departments that have significantly improved and where the young crop is better than the old, and should expect to be paid better when comparing at the same stage in their careers. But it's hard to determine a "fair salary" between different ranks if all you reduce things to is grants & publications.
You seem to think that 'top' assistant professors carry the whole university. They are one of many variables that play a role in the running and success of a university. Who do you think pay the salary of professors? Hint: it's not high quality papers. Answer: coursework students. How do you get coursework students? for one, you have to teach well, have a well-run university; good admin, programs, reputation for teaching, community engagement, getting jobs, etc. These 'other' people you seem to think the ass/prof are better than actually created the environment that allow the ass/prof to flourish. Who do you think should get the higher pay? The leach (newbie) or the host?