They aren't even supposed to look carefully at the people waiting in line to confess. If you stand in a confessional line at a Catholic church before the priest arrives, you will probably notice that he makes no eye contact with anyone in the line and doesn't speak to them either.
If you confessed to Jesus, do you think that Jesus would go around telling (possibly malevolent) third parties what you had confessed? Of course not.
“If you confessed to Jesus, do you think that Jesus would go around telling (possibly malevolent) third parties what you had confessed? Of course not.”
Bad analog - I confess directly to Jesus because He is the one who counts - He doesn’t require I say X-number of Our Fathers or Hail Mary’s, He just wants me to admit my sinfulness and express true regret, while asking Him to be my Lord and Savior.
If I were to be guilty of any crime or sin and opted to confide in another human being, I may wish for them to keep the confidence but could not demand it.
I’ve been a receptacle for some to lay out the wreckage of their pasts and always told them up front that if they ever molested a child, committed forcible rape, or killed someone, they better not tell me because I might very well turn them in.
Even convicted murderers who are in jail and/or being put to death can be saved by Jesus if they go to Him, but His forgiveness does not absolve them of earthly laws - and that’s also Biblical.