I am writing a story, which involves the main character springing a big and dramatic surprise on their adversary in court.
A large part of the story involves the explanation/backstory of how he came up with that surprise.
The challenge is that I seem to be in a lose-lose situation:
If the backstory/explanation goes first, it spoils the reveal/surprise in court for the reader, which seems to devalue the whole climactic scene.
If the backstory/explanation goes after the court scene (which is at the front of the story to ensure surprise), then first of all, the story feels klunky due to narrative jumping back in time after the court scene, and also it feels like the readers would be underwhelmed by the rest of the story - since the court scene is the point and the climax and the resolution (part of what contributes to this problem, is that the story I am writing is the sequel, and the setup for the court scene is the whole original story).
Is there a way I can resolve this conundrum somehow? My only idea was to somehow use mis-direction, but given the specifics of the story, I simply can't come up with any plausible mis-direction for the specific surprise.