The church needs to understand that one cannot be truly absolved of sin unless that person pays both a religious punishment and civil punishment. If a priest has hurt a child he needs to answer to the authorities and not hide behind the seal of confession.
Your post doesn’t make a whole lot of sense. The church doesn’t get to pick and choose who is subjected to civil punishment; police, DAs, judges, and juries do that. And nobody can be compelled to testify against themselves, not even Catholic priests accused of molesting kids. That’s in the Constitution, not the Code of Canon Law.