I don't think she was just an ego boost.
Okay, so they met at work. I meet a lot of people at work, I don't talk to them about my relationships in general, maybe a "How is X?" type conversation. Taking it down the "oh it's not great" path is a cheater's pathway, it's assessing interest.
OW thinks about what she's said and breaks her relationship up. That's quite a clear signal but your DP ignores this.
They go for drinks. He volunteers the information that he's realised he doesn't love you. It's another hook. If it was true, he needed to be telling you, no-one else. It's for effect, though, it's setting up the stage.
He decides to see how he and OW get on before he leaves you. She's either genuinely busy or not that interested in dating him whilst he has a partner. Regardless, she doesn't prioritise being able to make the date, which annoys him. If he's going to have an affair and rationalise it, she needs to be running around after him so he can blame her (in his head, and potentially to you).
They meet up again, things get more physical, they kiss. She suggests they have sex as a one-off (she's rationalized that sleeping with him once isn't as bad as having an ongoing affair with him). He rejects that, he doesn't want just sex, he wants a relationship. She probably says that she won't date him whilst he's with you, which starts a conversation about him leaving you.
They keep meeting for innocent drinks, keep having conversations about whether he'll leave you, how unhappy he is...all the lines he's already fed her to prepare for the affair.
She finally decides that she doesn't want to play games anymore and if he wants to date her, he needs to leave you. He doesn't like that he doesn't have any power anymore, and refuses. It's not fun if he's not the one in control. She has a go at just being friends, he's not interested because he never wanted to be her friend, he wanted an affair with her.