I think that God is probably listening in when a Catholic confesses his sins to his priest. And is it harder to admit sins to another than just to admit them to Jesus and His Father alone? BTW, I’m not Catholic. And I believe that Paul mentioned something about Believers confessing their sins in public before communion.
There are many opportunities to confess sin in public. The most effective is the “don’t do what I did” confession explaining the real consequences of one’s sin in counseling another. There are consequences within you always whether you are self aware or not; even beyond what society deals out if you are caught.
The rules of God are to keep one healthy and sane and on a larger scale, society the same. It’s better than whispering secrets to the Priest or even like minded congregations.