FWIW, I think the same issue would have occurred had the joke been related to Corbyn just after he had been "egged" (or any other easily recognised political throwing incident) though it largely would have been different people claiming outrage. It would objectively have been equally funny/cleverly crafted/ totally unfunny according to your perspective, though I agree perspectives change depending on the perceived "butt" of the joke and the nature of the teller.
Though the key argument remains, imo, not if it is funny/well advised or whatever, but whether JB should be allowed to say it without being pilloried, called to be sacked, apology demanded or whatever. Assuming it is agreed she wasn't inciting anyone to violence, so it was not illegal, I think the move to hinder free speech of comedians for fear of troops (of whatever persuasion) being rallied is a bit sinister. She was totally within her rights to put forward the joke for public hearing, and be judged as a comedian on it. We may decide she fell on the wrong side of the taste line for it to be funny, but these lines change all the time (benny hill or mother in law jokes no longer generally being considered funny, for example). Personally I don't think there is any topic that should be considered off limit for a comedian if they can handle it appropriately. Their job is to make people laugh, and often that is done by challenging authority, being risqué or whatever. If their intended audience laugh, they are winning. She shouldn't need to apologise if a joke falls flat...though maybe should if she caused unexpected offence to someone outside the scope of the joke.
As it went out on the BBC they had some responsibility to ensure that it wouldn't be too outrageous for all but a niche "intended audience" and wouldn't get them in legal trouble, but I think they were safe on both those points. Though maybe they misjudged it slightly given the current political tensions, which is ironic given the nature of the programme!
It is obviously different to politicians, or even a "man down the pub" saying the same thing in a different context - and then claiming "it was only a joke, innit, I didn't actually mean it" when pulled up. In this case, it was quite evidently "only a joke".