There’s this thing they have in French: l’esprit d’escalier. The spirit of the stairway. I don’t think we have a word for it in English.
It means, well, the clever things to say that you only think to yourself when you’re on your way out. All the cool stuff you wish you’d said at the time.