Limiting comedy to things that steps on no toes would rob us of one of the only, genuinly effective, ways to deal with the harshness of the world. Like if you look at comedy as just something to get a few cheap yucks then i could see why you'd be enraged by it, but as i see it is more often than not a way to deal with things we cannot deal with any other way, tough things, things we can't change, things we need to vent.
I don't like your premise here though that seems to say it's some inherent thing in comedy to be "bad" and that's an okay thing. I like comedy a lot. I absolutely adore comedy, actually. I spend more time goofing off than being serious on AP because I'm a sad person who is bored with new sincerity and would rather act like a terrible poster in ways I find funny because I really, really like goofing off. I have also done okay to decent 15 min standup acts in a traditional setting that have gotten genuine guffaws and chuckles, and seen people come up after me absolutely kill in ways I could only admire. I know how comedy works and I may not have genuine and developed theory on it the way I do with many other arts I am actually good at, but I definitely understand it. I'm not some humorless angry queer person. So like.
I think there is a world of difference between being somebody who is "aware" and somebody who is "clueless." You can joke about harsh things. When Robin Williams walks into his awful son's room in World's Greatest Dad to find that his kid has accidentally killed himself with erotic asphixiation, I could not stop laughing and the more Robin Williams sobbed the funnier it was. It was a very tragic and almost beautiful scene amidst how hilarious it was in a very dark way. There are some really, really cruel manners of humor I have done myself because there has been a lot of sadness in my life and it's freeing. I like black comedy a lot. This very same scene could also be absolutely heartbreaking other days. It's a funny line. I am okay with it altogether.
It's basically about tact, understanding. It's about being smart enough to know what is genuinely a bad idea, about being clever enough to work around things, about having the empathy to actually consider "could I hurt someone with what I am saying?", about being aware enough to know that there are actual issues in the world you may be making light of in ways you are only ignorant of. Asking yourself questions before putting something down is important. It is not healthy to go into comedy thinking it's a vacuum that exists by itself. It is harder, it is also usually funnier and smarter. Admittedly there's a lot of classic and beloved comedians I do not like at all for being genuine assholes. I find them scummy. THere's quite a few prominent British comedians I loathe for being absolute shitheads that people are okay with ebcause they're "classy and funny". There's a big difference to things like being a queer person yourself and drawing from experience to poke fun at elements of it, than if you are like a straight dude who is punching down at marginalized people. Like, one of the understood things about comedy is you do not punch down because it is cheap, boring and tasteless. I mean I know some people who are absolutely clever and hilarious and go in so many great territories for exploring comedy and it does not have to be rooted in being a tactless shithead.
Like all I'm saying is just because comedy can alleviate the harshness of the world and be relieving for one person, does not make it hurting another person any less valid. They are both legitimate stances and the only proper thing is to actually care what other people think. It is not going to eradicate all your material. Sometimes it can salvage it. The fear that it'll only lead to everything being erased because "anyone or anything could be offensive" is only a fear bred out of ignorance for people who truly have never opened up their ears.