TLDR: My coworker makes unkind jokes about someone else to build rapport or support friendship with me. This makes me uncomfortable because it is outright mean and has noticeably hurt the teased party more than once.
Background:
I have a coworker who I have become friends with. He feels very close to me and (over)shares a lot of his personal life with me. He also feels very free to ask very personal questions about my life and frequently crosses my normal boundaries for coworkers and men (I am a female 10 years his junior). I am working on getting him to recognize that when I deflect his questions and statements I am attempting to avoid a topic he has brought up. Usually, his response is to ask again even more directly, which is uncomfortable at best. He has told me several times he believes himself to be on the autism spectrum, which I believe contributes to his ignoring my conversation signals. I am close enough to him to spend social time at his house and house-sit for his pets. (Read: coworker is harmless, married, and acts more like he's my age.)
The Problem:
Recently I have noticed that one way he likes to build rapport is to make fun of my boyfriend who is also a coworker, and typically the kind of guy to clown around and make jokes. On one recent occasion, I made a joke of some sort, my boyfriend thought it was a little funny, I explained the pun in the joke, and then he laughed more, understanding the real joke. Our older coworker then chimed in a euphemism about the last horse crossing the line and I didn't understand the phrase. When he clarified he said something like the stupid people laugh last. I thought that was a very mean thing to say. Being the non-confrontational person that I am, I attempted to deflect by saying "I usually laugh last" which is entirely true, but because I have a hearing loss that causes me to miss jokes. Then instead of allowing me to shift the conversation to myself he basically drove home the point that he thought my boyfriend was stupid and should have gotten the joke.
What I would like to achieve:
I don't think he actually thinks my boyfriend is stupid. He thinks very highly of the both of us. But because he works closer with me and is closer to me, I think that my boyfriend is seen as a mutual punching bag to bond over. How can I make it clear that this behavior is unacceptable? In the past, when I have called him out on very minor offenses against coworkers who were not offended in the moment, he just grins and says "I know, I'm a terrible person." and makes a big joke out of it. In the past, if I have declined offers to hang out or said I'm busy or talk about an event I'm excited about, he will make it very obvious he is hurt that I won't make every effort to involve him and will guilt trip me while making a joke about it. I would like to tell him he shouldn't make fun of someone I care about, and for him to take it seriously with no joking and guilt-tripping.