Last month, as accusations against Harvey Weinstein began to flood in, James Corden stepped on stage at a black-tie event in Los Angeles and joked about the film producer’s alleged sexual assaults. “It’s a beautiful night here in LA,” he said. “So beautiful, Harvey Weinstein has already asked tonight up to his hotel to give him a massage.”

Two days later, after a barrage of criticism, Corden apologised. He is one of many comedians who have attempted to engage with a contentious topic only to have the move wildly backfire. It requires huge skill to take on a taboo subject and even then it’s still a minefield. Lenny Bruce was arrested many times for breaking obscenity laws, for saying things like “jack me off” and “motherfucker”. He was eventually convicted in 1964. One routine, which suggested that men will cop off with anything, included the phrase “go come in a chicken”. In 2003, he received a posthumous pardon.

So how do comedians approach taboos? Is there such a thing as too soon? Margaret Cho is addressing the Weinstein scandal in her latest show: so what does she think went wrong for Corden? “As a general rule,” says the San Francisco-born comic, “if you haven’t endured sexual abuse, you probably shouldn’t talk about it.” An abuse survivor herself, Cho says: “My compassion about the issue is built in because I am also the issue. It’s about compassion and experience, rather than talking as an outsider, like James Corden.”

Facebook Twitter Pinterest Lenny Bruce is searched at a police station after his 1961 arrest for using obscene language on stage. Photograph: Everett Collection/Rex Features

There are always exceptions, says Cho, but drawing on personal experience is her way of finding laughs in subjects not inherently funny. “Where do we find a glimmer of hope within all this terrible stuff?” she asks. “That’s where comedy comes in.”

Cho’s audience is largely familiar with her material, the topics she takes on and words she uses. But there are still punters who take offence. “It happens all the time,” says Cho. “I have had people get into full-on brawls, but that reaction’s sort of over. Back then, I didn’t have enough skill to be able to open up a can of worms and then wrangle all of those worms. Now I have a multilayered approach. You have a lot of power as a comedian. Words have an extreme amount of power.”

It’s a point that Doug Stanhope understands well. The US comic is widely regarded as fearless and brutally honest. He’s written material about abortion, child abuse, racism and rape, but always in a way that tries to challenge easy assumptions. “I gravitate towards subjects that are controversial because that’s what’s interesting to me,” he says. “I have no take on the Kardashians. I don’t watch it, it doesn’t affect my life.”

Stanhope says he works material like a defence lawyer. “I try to find the angle where you go: ‘Oh, jeez, that does present reasonable doubt.’ It’s just a matter of finding the right client. When you have an angle on something that nobody else is touching on, that no one seems to see but is very obvious to you – well, do I like being original? Yes.”

Facebook Twitter Pinterest An outsider … James Corden received a barrage of criticism. Photograph: Evan Agostini/AP

Stanhope examines sexual abuse on stage. “I have some rape stuff,” he says. “It has to be delicately phrased. My fear is it coming out wrong. It can come across as making fun of rape victims altogether if it’s not worded correctly.”

I don't say 'faggot' any more – even though I have defended the use of it in the past Doug Stanhope

The 50-year-old started performing in his 20s. “Things evolve,” he says. “There’s stuff I have on albums that I probably wouldn’t do again, or I would rephrase. I don’t say ‘faggot’ any more, even though I’ve defended the use of it before. But at some point you’re just going to be that old grandpa racist going: ‘Well, that’s just the way we talked when I grew up.’”

Countries can differ on what they regard as taboo – and divisions can exist even in the same country. When David Cross, the standup and star of Arrested Development, brought his Making America Great Again! show to the UK last year, his thoughts on gun control and Donald Trump weren’t considered divisive. But when Cross toured America’s south, it was a different story. “I felt the tension more than I ever have,” says the comedian. “People didn’t want to hear it. To them, people being shot dead should not be a subject for comedy – there’s nothing funny about that. And I disagree.”

Facebook Twitter Pinterest Works his material like a defence lawyer … Doug Stanhope in his tour minibus in 2012. Photograph: Christopher Thomond

Cross made wider points about police brutality and gun-control laws, but some punters voted with their feet. Does he regret that? “I’m so used to this by now,” he says. “If a handful of people walk out because they don’t like the subject or the way I’m approaching it, I can’t help that, nor do I want to. Maybe this is just a mixture of cynicism and experience, but I don’t think they are going to come around.”

Cross says a number of factors float through his brain when he is dealing with a contentious issue: aiming to make a point, get the biggest laugh possible, and challenge himself to come up with something funny. But there are words that offend, no matter what. Unusually for a white comic, Cross says the N-word in his latest Netflix special. “Which word?” he says, when I ask him about it. “Neighbourly? Nefarious? I’ve never called anybody a nincompoop!”

Joking aside, Cross says he has been challenged for it many times. “I’ve gotten so much shit. If I’m directly quoting somebody, or putting the words into a character’s mouth, that’s how they speak. It’s just silly. I’m not a child, and the people I’m talking to aren’t children.”

When the Australian comic Jim Jefferies first performed in the US a decade ago, saying “cunt” was considered controversial. Having come from the Aussie circuit, and worked in the UK, he was used to throwing the word around. “In America, there were comedy clubs that would say: ‘One rule – don’t say that word, people hate that.’”

Facebook Twitter Pinterest ‘I’ve said stupid things, but I’ve always felt like I’ve done it in character’ … Jim Jefferies. Photograph: Ethan Miller/Getty Images

Jefferies’s jokes often have shocking punchlines. He has a maxim: “If it’s really, really offensive it has to be really, really funny.” If there’s laughter, he says, anyone who is upset has no case because it’s obviously been taken as a joke – the audience laughed, after all. “There are some things you believe in, and some things that you believe are funny – and they are two vastly different things. But it happens organically. I’ve never thought: ‘I’ll challenge myself and try to write a joke about – I don’t know – the Dalai Lama.’”

The comic recently put forward his take on the Weinstein allegations: “You don’t go to rehab for sexual assault. You go to prison.” An online clip from his show scored a million views in 24 hours. But towards the end of the segment, Jefferies reflected on some of his own material. “Now, I’ve been known to make the occasional inappropriate or sexist joke,” he says. “But I’ve always believed my audience understood that those jokes don’t represent my actual beliefs. Then came the day that a large part of America was willing to write off ‘pussy-grabbing’ as locker-room talk, and I started to rethink that.”

Facebook Twitter Pinterest Didn’t realise she was tackling taboos … Fern Brady. Photograph: Murdo Macleod/The Guardian

Has he re-evaluated his position as a standup? “I’ve said stupid things, but I’ve always felt like I’ve done it in character. I’ve done a lot of rape jokes, jokes about domestic abuse – and those are the jokes I probably regret. I’ll defend them because they were funny, and the structure of the joke was good and everyone laughed. The only thing I regret is I don’t know if everyone took it as a joke. I’m still going to be doing jokes about women and how relationships have ended in my life. I don’t want to become a wimp and become less edgy, but also I’m a different guy to when I was 25.”

There are comics who have gained a “controversial” reputation almost by accident. Take Fern Brady. The Scottish comic’s latest show deals with murderous thoughts, abortion laws and the time her ex-boyfriend tried to kill her. But she says: “I hate shocking people. I never want people to feel bad during my show. I tried, this year. I thought: ‘I really want to do normal material about my home life.’ And then I wrote stuff about thinking about killing my boyfriend in his sleep, so you can’t really get away from who you are.”

Brady says that it was only after reviewers started to describe her as “dark” and “caustic” that she realised she was tackling taboos. “People would say: ‘You’re so honest.’ I just thought: ‘Why is everyone else lying, then?’” Her abortion jokes have received bad reactions, but they are motivated by anger. “I find it infuriating that Ireland and Northern Ireland still don’t have legal abortion. And it’s perpetuated largely out of embarrassment and shame.” She doesn’t want to offend, just to state her belief that the laws are outdated and discriminatory.

Angels and demons: the unmissable theatre, comedy and dance of autumn 2017 Read more

“I really want to get those jokes to work – so everyone goes: ‘That’s a very reasonable point.’ I’ve not done it yet. Halfway through the Edinburgh fringe I stopped saying, ‘I dressed as a foetus’, and changed it to ‘unborn baby’ and the joke started working better. I would have thought ‘unborn baby’ was more emotive than ‘foetus’ but apparently not.”

With Corden’s gags, many thought the timing was particularly insensitive. So does “too soon” really exist? “Absolutely not,” is the answer I get from most comics. “The ‘too soon’ rule doesn’t apply to comedians,” says Stanhope. “When a mass shooting happens, or a hurricane is destroying Texas or Puerto Rico, the majority of comics are staring at their Twitter accounts, daring themselves.”

• Margaret Cho’s Fresh Off The Bloat tour reaches Britain on 25 November. Doug Stanhope’s book, Digging Up Mother: A Love Story, is out now. David Cross’s Netflix special, Making America Great Again!, is streaming now. Jim Jefferies’s Unusual Punishment tour hits Britain in January. Fern Brady’s Suffer, Fools! tour starts on 9 November.

This article contains affiliate links, which means we may earn a small commission if a reader clicks through and makes a purchase. All our journalism is independent and is in no way influenced by any advertiser or commercial initiative. By clicking on an affiliate link, you accept that third-party cookies will be set. More information.