I think you will have a hand time finding clear guidelines to answer this question, and to err on the side of caution is NOT an across the board solution.
I think that most people can judge things in their heads, by weighing in a number of factors. These factors would include whether the person has animosity towards the target of the joke, whether the joke was intended to offend, if it is broadly accepted that the subject matter is offensive (which would indicate that it was intentional), if it is about something that is legitimately embarrassing, if it was about an individual (more offensive) or a group of people (IMO less offensive), and so many other factors.
I think that 90 percent of jokes would get a unanimous vote on offensive or not, because most GOOD HEARTED people will be able to properly gauge if a joke is offensive. The other 10 percent are in the gray area, and different GOOD HEARTED people will perceive it differently.
That being said, there are many perfectly acceptable jokes that some people scream about and it makes businesses be overcautious, not because they think they are offending anyone, but because they are afraid it will harm their income.