I think that's really a relationship preference, though. I tell stories that involve exes in the same way I tell stories that involve other friends--when it comes up, if it's interesting, etc. I don't think there has to be a point or a reason to telling the story that is about trying to make the SO insecure or anything. But, I don't see it as disrespectful to my relationship, nor does my SO. I *would* have an issue if he (or I) were mentioning the ex way too often, but again I think that's going to be really variable as to what a person considers 'too often'.
There's a thing I've heard called 'mentionitis' where a particular person is mentioned an...unusual amount, and I've absolutely seen that happen with exes, but what's a normal amount of ex-mentioning is quite different from person to person, and I don't really think there's a one-size-fits-all policy here.
I would compare it to "mentioning other attractive people in front of your SO", though I'm on the other side of that one. I really don't like it, and would not do it myself, but some couples are completely fine with checking people out together or mentioning what stars they think are attractive etc. I don't think they're being disrespectful because they're both fine with it, but I wouldn't do it personally.