Everyones boundaries around this are going to be different. You need to work out what your own limits are and why, and then hope that your wife thoughts are compatible with that.
Me and my DP are fairly permissive when it comes to ex'es. They kind of have to be when you live in the same small town you grew up in. My DD's head of year next year is going to be one of my exes, and two years ago we went to the wedding of one of my exes and her exes. My parents family friends have children who I went out with in school etc. So the odd message on Facebook isn't exactly going to bother us.
But that doesn't mean there haven't been occasions that have given us the wiggins.
About a decade ago, DP started chatting to an old work friend who'd got in touch, someone she'd hooked up with a few times, but they'd never properly gone out. She mentioned it to me, and I initially thought nothing of it, but she was getting more and more engrossed in her phone. Alarm bells started ringing for me, especially as we were going through a bit of a rough patch (nothing serious, just one of those periods in a long relationship where you drift a little bit before coming back together)
I asked her if I could see the messages, she agreed. I thought he was blatantly trying it on, she disagreed. I pointed out my translations of what he was saying, and even a few points where I thought she was flirting back. We had a long conversation about it and she agreed to block him. Not necessarily because she agreed she was in the wrong, but because the sheer fact that alarm bells were ringing for me was enough.
More recently, I was on a work night out. I tend to be one of the last ones out, and I ended up putting a very drunk woman in a taxi home. Next thing she's got back out because she can't remember where she lived, so I end up having to get a taxi with her to the other end of town, and deposit her with her waiting husband. As a result, I got home very late. The next morning I tell DP what went on, and a few hours later I get a "Did anything else go on with her last night?" My story didn't add up for her, and she produced a couple of reasons why. Luckily I could easily produce an alibi and reciepts, and her mind was put at rest.
What I'm trying to say in the essay above, is that sometimes alarm bells will ring, even if it's completely unfounded. The way to deal with it is to work out why they're ringing for you, work out for yourself whether it's a false alarm. If you think it's not, make sure you can put into words why not, and then have a calm conversation with your partner about it.