I have this problem constantly at work. I work in a poker room. People always want to tell you "bad beat" stories. How they lost this hand, or how they lost this sports bet. Or they want to talk about sports and whom they are betting.
For me I don't bet sports and have no interest whatsoever in sports. As for bad beat stories, they are just people venting about loosing, and are boring to listen too.
For the most part I just take it all with a grain of salt. But occasionally there will be a person that just keeps talking and keeps coming back to just keep talking about nothing that I care about in the least and to the determent of my time and need to attend to other duties.
This is generally a problem for a lot of people in my particular industry. Overtime I have discovered, or became aware, that these kinds of people are talking to me because they feel we have a general frame of reference, an interest in the subject, in my case sports and/or poker.
Overtime I have become a little skilled at handling these people so they mostly go away unoffended. Hopefully some of this may help you.
I have never really had a problem with those whom want to talk about sports. They start talking and I just shrug the subject off with comment like I know nothing about sports. They get it and go away, realizing we simply had no common frame of reference for the conversation.
With bad beat stories about poker it is tougher. I play poker, my job is in poker, so I can't get away with the no common frame of reference plea.
Often I can get away with not engaging by finding something else that needs doing, and after doing that a few times they fade away. Something the OP is trying to do now with no real success.
One upping them with dull stuff that has happened to you sometimes works. They really want to tell you a story and get your empathy, but if you have a similar yet more extreme story it often will take the wind out of their sails. When they tell my how they lost with a full house, I tell them how I once lost with four of a kind. When this happens they will not be getting what they came over for and will stop after awhile. Your just turning their story on its head and making it about you instead of them. They wont like that and will stop coming to you.
Turning the subject into a joke. Often my response to them is humorous. When someone wants to talk about football or horse betting, a stock reply of mine is "I never bet football or horses because I was told you should never bet on things with brains the size of walnuts". They go away with a chuckle. With poker I have enough context to point out some irony or the other about the story that they are telling me. Humor works because your not giving them the ear they want and its a good way to convey the message that you are really not interested in what they are saying without coming off as offensive.
I guess what I actually convey to these people whom are intrusive like this, is that yeah we all have problems what makes you so special. I think that is the point they get without being offended by whatever metaphor I use to make the point.
Since almost all of these people are also my customers I have never had the convenience of just being haughty or plain with them about what I feel about what bores they are at times. The things that I do to handle these situations have never been 100% effective, some people are doomed to never getting it when it comes to social skills. With some people the talking about this and that and whatever is a compulsive behavior they can't help or stop, I have no clue what to do with some of them, short of just walking away.