Did you have a hard time understanding comedy when you were young? I remember as a child always having to tell him I was joking. The interesting thing is that he would remember it so if I made a joke that was somewhat similar, he would start laughing. If it was something new, I would have to start over and tell him it was a joke. Never thought much of it as a child but as an adult, I started to wonder if he wasn't on the spectrum. Pretty sure he his.
I generally connect with observational comedy and it's very rare that I have a gut-busting belly laugh like some people do. There's a lot of comedy I don't 'get' but like your friend I'll politely laugh and go along with it.
Schadenfreude and ironic justice is often funny to me while others may not always find it funny. There was a video I saw a long time ago of some Arab man firing a rifle at an American tank somewhere and he ended up getting obliterated by a single shot from the tank. The stupidity or hubris of attacking a tank with a rifle made me giggle and it still does. It reminded me of Road Runner cartoons where the coyote would get tripped up by his own stupidity or arrogance.
I hate laugh tracks on TV shows that try to tell you when to laugh because the 'comedy' itself is usually insipid and not at all funny to me.
Here's one thing I will leave you with is that IMHO everyone is on the spectrum to some degree or another.
To me the spectrum looks like this:
Non-functional <-----------------> Functional <-----------------> Not apparently symptomatic