Only if you ignore the types of jobs people do.
Public sector jobs are disproportionately done by qualified professionals, doctors, nurses, other medical staff and emergency workers, regulatory, police is now a graduate role, scientists, teachers.
A lot of non graduate roles like cleaning and care work were privatised, further skewing the demographic.
So you need to compare public sector pay with typical private sector professional roles, so the well paid career pathways into law, banking, accountancy, IT, pharmaceuticals etc.
You won't find many of those types earning £30-40k ten years into their careers. And that's before bonuses and other perks that are generally non existent in the public sector. The pension might not be the same but I've seen a lot of people describe their death in service benefit as being far higher than the typical 2 to 3 times salary in the public sector.