noun: 'staircase wit', 'afterwit'
This phenomenon literally translates as 'staircase joke' and is used to refer to the perfect retort or witty comment that fails you in the heat of the moment, but only comes to mind once you have walked away from the situation.
Ich hätte ihm widersprechen sollen, aber der Treppenwitz ist mir erst eingefallen, als ich schon weg war! = I should have answered him back, but the staircase wit only came to me after I'd left!
Staircase. Photo: palmettophoto via Pixabay