Yes, it was dumb on enouh levels it deserves a really, really.
But if things are as the confess-er confessed---
Guilty of being dumb, and guilty of contemplating seeking out titillation (with the enhanced charge of dumb refactored into the equation) still sounds relatively small compared to extremes I'd just as soon not think about.
Maybe he could remarry instead. It would be no offense in Christian religious sense.
Yes, extremely small. He could have gone to a bar somewhere he isn't known, picked up a woman (for free or for money), and had sex with her. That would have been much worse, morally, than visiting Ashley Madison, but it wouldn't have that face-palm, "Who falls for this?" frisson.
He certainly could remarry with no moral opprobrium. Perhaps he just hasn't found someone suitable who will agree, or perhaps, in spite of sometimes feeling lonely or frustrated, he's not ready to consider "replacing" his late wife.