Confession is healing of the soul by repentence to God mediated by a priest, psychoanalysis indulges in a confession of the secrets of the soul in order to heal. Is there any connection here or am I tying together two different ideas altogther. One theological, and the other scientific.
The article referred to in the comments notes that Jung was amongst the first to compare the two, in his article 'psychotherapy & the clergy'.
I'm asking a different question, whether there is a genealogical connection between the two.
It turns out that Foucault discusses this question in his History of Sexuality, Part III: Scientia Sexualis.
"Returning to the influence of the Catholic confession, he looks at the relationship between the confessor and the authoritarian figure that they confess to, arguing that as Roman Catholicism was eclipsed in much of Western and Northern Europe following the Reformation, the concept of confession survived and became more widespread, entering into the relationship between parent and child, patient and psychiatrist and student and educator; by the 19th century, he maintains, the "truth" of sexuality was being readily explored both through confession and scientific enquiry. Foucault proceeds to examine how the confession of sexuality then came to be "constituted in scientific terms", arguing that scientists began to trace the cause of all aspects of human psychology and society to sexual factors".