The version of the Esterhazy story that I heard, many moons ago , was that a very 'U' lady was at dinner having the same problem as the emperor you mention. On the first occasion, the gentleman to her right excused himself. On the second occasion , the gentleman on her left excused himself. When she did it a third time, after a short pause the gentleman opposite her said 'Have that one on me, Ma'am.'
(Thus proving, of course, that he was not 'quite' a gentleman.)