Almost every joke starts out as a bad joke. A comic featured on Comedy Centrals Roast Battles that I had the pleasure of opening for a few times when he was on tour told me "fuck what the audience thinks. It takes a year to two years for a bit to become really good." Which I would say is absolutely true. If a brand new bit does well the first time you tell it that's a good sign, but a lot of work goes into writing a good bit and implementing it into your act.
Agreed but there are several ways to do racial humor. I used to do a bit about how white couples adopting black children freak me out. They're picking one out, paying for them, sometimes renaming them, then going around telling everyone the kid is " theirs" and said it sounds a lot like a slave auction.
Some laughs but I could feel the audience recoil so the punch line was "Im just saying... Consider the ginger, we're the most unwanted fertalized eggs since Jurassic Park. We've been bargain bin babies too long" and it would usually land well. (Ive since dropped it from my act but use the ginger bit) the reason the bit worked was, even though what I said was racially insensitive, I turned it back around on myself.