It used to be said that pornography would make monsters of us all, steal our sense of morality and respect and destroy us in the end.

But what happened was the opposite.

Suddenly, the internet allowed people to consume pornography for free, and they did: eagerly, widely and casually, which meant they didn't need to buy dirty magazines or movies any more. Porn didn't destroy us. We destroyed porn.

It says a lot about Louis Theroux that in Twilight Of The Porn Stars (BBC Two, Sunday, 10pm) he makes us feel sorry about that situation. But that's his talent: he softens grotesqueness and blurs unpleasantness.

"In bad, there is always some good," he says. And here he is doing it with pornography despite everything there is to dislike about it.

Most dislikeable – and it was on show in little, silent moments – is the way the industry makes sex tedious. Witness the husband cleaning the kitchen worktops while his wife performs for strangers on a webcam, or the man checking his email while a couple have sex in front of him. However, the real point of Theroux's programme was the effect porn has on the performers, who were without exception sensitive, vulnerable, educated and interesting.

Cleverly, there were two narratives going on at the same time: one following the young people getting into porn, and one following older stars at the end of their careers. The contrast between the denial of the first and the regret of the second was striking, melancholic and rather moving.

Among the younger stars was Tasha. Theroux told her the problem as he saw it was that porn stars try to separate sex from an emotional connection. Was she able to do this, he asked. Oh yes, she said. And not only that, she got into porn because she's doing, of all things, women's studies at UCLA.

"I think that led me to 'adult'," she said, "because it's the only industry in America where women are paid more than men."

However, Tasha's position was demolished by the second narrative – the one following the older porn stars. We met Tommy Gunn, who has made 1100 porn films. We saw some of his awards: Best Group Sex Scene 2007, Best Couples Sex 2006. He would like to get married one day, he said, have kids maybe, but that's difficult when you have a career in porn. "Leaving someone you love to have sex with someone you don't is not normal," he said, and you could hear in those words the hissing, acidic effect the porn industry has on those who are in it.

But there was an important caveat. We met Monique, the widow of porn star John Dough. Dough committed suicide in 2006, and although some people suggested it was because the collapse of the DVD market ended his porn career, there were dark glimpses of other influences at work, mainly drugs. An important question emerged: does pornography make people weak and vulnerable or does it attract the weak and vulnerable? It's an important distinction and Theroux thought the latter. It can be a place of refuge, he said, a place where people can flee lives of chaos and blend in and feel valued. The sex industry can inflict terrible wounds, but it can also, surprisingly, be tender.