I do know where this is going! And will get around to writing it down properly! Indigo1100 and I hashed it all out (among other things she's become my muse). READ NO FURTHER IF YOU WANT TO BE SURPRISED ... ... ... So Irene's client is actually Kitty, who has been saving up for this encounter for over a year. After Irene helps John maintain his calm while they wait for Sherlock and Jim to finish talking, the two sets of men end up going their separate ways and think this is over. Sherlock back at his and John's hotel room demands Mind Palace time. Kitty sends a text to Irene shortly before their engagement, saying she's come into some unexpected extra funds and would like to turn this into a menage a trois if she can. Irene convinces John to be the third person - this does not take much effort. Cue bisexual consent-culture happy kink!
Unfortunately, Jim is very rattled by this whole business, and is slipping into paranoia. An innocent voicemail message from Kitty gives him the thought that she knows his and Seb's secret. And therefore must die. Sebastian works to dissuade him from this notion, but Jim gets more and more agitated until he's having a meltdown. To which Seb ends up cuffing him to the bed and in various ways trying to settle him down in that position, his standard desperate tactic when he thinks Jim really is going to get them all destroyed from a temporary freakout.
Sherlock falls asleep and has a terrible nightmare. He ends up storming into the suite where John, Irene, and Kitty are having aftercare and room service. This gives him his own meltdown, triggered by the fact that Kitty - at her own request - is handcuffed to a chair and being hand-fed, which reminds him too much of what Jim and Seb did to him. (This isn't a Trauma Conga Line, this is a Trauma Mosh Pit.)
After both John and Irene soothing him, and Kitty apologizing and taking her leave, they talk for a while. Sherlock suddenly realizes where he's seen Kitty before, having been too upset earlier to realize it, and worries that she's in danger. He figures out the neighborhood Jim and Seb live in from a variety of clues and they rush there. Kitty has a set of keys to the Conan-Doyle home, which was something Jim and Seb have argued about constantly but Seb prevailed over the idea that if something were to happen to Seb suddenly, like a heart attack, they need a contact person who could help Jim, who now has an understandable phobia of official emergency services. She lets herself in, wanting to discuss the bizarre recent circumstances - for she recognized Sherlock too but did not say so at the time.
I haven't figured out all the choreography yet, but in the final confrontation Seb is going to be in a fight with John and Sherlock, who are trying to incapacitate both him and Jim. Irene is acting as lookout. No one actually knows that Kitty is in the house right now. An absolutely at-the-end-of-his-rope Jim has managed to get himself free from his bindings and is blindly crawling around the floor. (Trauma Mosh Pit, remember.)
Then, when John has Sebastian in a headlock and Sherlock just about to call the police, Irene comes in and tells them a light just came on in a room upstairs. So they frog-march Sebastian there.
And find Kitty cradling a sobbing Jim, telling him everything will be all right, and though the past affects us deeply it is not the same as present and it does not ever, ever have to be the future. And Jim actually listening to her, and his breathing returning to something sustainable.
Embarrassed and touched in ways they did not expect, the relatively-good trio apologizes (sort of) and retreats, though not without some parting threats, especially if anything is ever found out to have happened to Kitty. Jim accepts a dose of anti-anxiety medication and Sebastian takes his leave to help Jim get a hot bath. Kitty waits in the living room, reading.
Seb: "I've put him to bed. He's very worn out."
Kitty: "I should say so. Care to explain?"
Seb: "He and Mr. Holmes were in a mission together that went very badly, and they were trying to settle scores. But I think they're done now."
Kitty: "Good. Hardly the kind of nostalgia you'd want, is it?"
Seb: "No, definitely not."