So one more thing, and then I'll try my hardest to leave the matter alone. I've thought about it for like, fifteen minutes, and came up with what I think would be a better ending to His Last Vow. Here's how I would rewrite the episode:
His Last Vow redux:
Magnussen knows stuff (knowledge is power, France is bacon and all that jazz) and has a mind palace indeed, but he just pretends to have proof without actually having anything (why? Because blackmail material in hard copy can be eventually found and destroyed, whereas with this little scheme the blackmailing is virtually limitless). The letters he shows Sherlock in 221B after the fireplace incident are actually blank pieces of paper. There's a whole room of blank stuff or empty files in his house which visually makes for a beautiful metaphor (and if people find out about it, Magnussen can pretend it's a decoy for the "real" real blackmail material that he hides elsewhere -- but of course he doesn't have anything, it's all smoke and mirrors). The plot twist here is that Magnussen preys on fear with empty threats, and he pressures people psychologically with basically nothing -- which is the real perverse thing. A fake blackmailer.
In the denouement of the episode, instead of Magnussen just willingly showing the mind palace trick to Sherlock and John -- which would be a really stupid move on his part -- Sherlock deduces that Magnussen has a mind palace and that the information may be real, but the proofs are bullshit(or he can get the confession out of Magnussen in a daring and brilliant plan that unfolds in front of John's astonished eyes because Sherlock is totally clever and brilliant, and not a dumb fuck who gives a laptop full of sensitive material to the bad guys with no other plan than a GPS tracker inside the laptop). Because, you know, deducing or coming up with clever plans is what Sherlock does.
SHERLOCK: You're a fake, Magnussen. So leave me, my friends and all the people you've ever blackmailed alone, or else...
MAGNUSSEN: Or else what?
SHERLOCK: Or I'll tell them about your castle made of blank paper. You've built your power on nothing but fear, and that allowed you to behave like a pig, trampling people's dignity, but what happens when they're not scared of you anymore? And that's your own biggest fear, isn't it? Back to being nothing, being dismissed as, in your own terms, "unimportant"... A pity. You've a mind that could rival mine, and yet you chose to use it in the vilest way possible...
MAGNUSSEN: Why don't you tell them all already, and get this over with?
SHERLOCK, smiling darkly: Because I want you to behave, and see you dance to my tune. I want you to know what being blackmailed feels like. I want you to feel fear for the rest of your life, as long as I hold this over you. The blackmailed blackmailer. Quite poetic, don't you think? (He starts walking away from a completely destroyed Magnussen) Come along, John!
MAGNUSSEN seizes a letter opener and tries to stab SHERLOCK with it, JOHN decks him.
JOHN: And know that Sherlock Holmes is under the protection of John and Mary Watson, so don't even think about trying that again. Dweeb.
SHERLOCK smiles his proud "that's my Jawn" smile but also there's a lot of emotion in his eyes because John said that Mary and he will look after him.
Then they have a threesome and live happily ever after in a polyamory relationship
THE END