Louis C.K. rolled the dice in front of a Jewish audience with what many might consider an incredibly insensitive joke ... but it sounds like it paid off for the guy.

The comedian was performing a stand-up show Thursday near Tel Aviv, and in front of a reportedly packed house of predominantly Jewish citizens ... he cracked, "I'd rather be in Auschwitz than New York City," adding a caveat ... "I mean now, not when it was open."

For the record, Louis is part Jewish on his father's side. And, besides that, he also got a big laugh out of the crowd, according to reports. In other words, the joke landed.

A bit of context, Louis was reportedly talking about how rough it's been for him in NYC in the wake of his 2017 #MeToo scandal -- in which he admitted to years of sexual misconduct -- notably, masturbating in front of women and abusing his power in the comedy world.

The fallout for him was pretty swift and fierce -- his movie "I Love You, Daddy" got yanked from its scheduled release, and Louis went into seclusion for a while before attempting a comeback -- which has been hit or miss, but mostly miss in the court of public opinion.

Play video content 6/24/19 TMZ.com

On the Auschwitz joke, he was complaining about the scrutiny he receives nowadays in the city he once loved and called home, which he seems to think has gotten too PC. At one point in his set, he joked about how he gets flipped off randomly at diners and on the street.