Public confession is better IMO
I have no idea what this man’s intentions are, hopefully they were good. But the person he mainly wronged was his wife. And his last act was to humiliate her in public. On some level, he was salving his own conscience at the expense of his wife.