The "Ulysses contract:" Medical use only? Difference with other contracts? First use?

Just read this in Wiki.

Ulysses wanted to hear the Sirens, even though he well knew their song makes all who hear it temporarily insane. So he told his crew that they should stop up their ears with cotton, but that he be allowed to hear only on the condition that he be chained to the mast, and other sailors be allowed to spear him if somehow he gets loose.
So, metaphorically, what I sign now says what I say it means later, even if later I say different, because later I will not be of sound mind or body.

I think that’s right, and would be interested in other interps.

Also,

How does this differ from a zillion other contracts that lawyers learn about? (I know “contract law” is like “physics:” a big bunch of turf.)

Is the term or concept used in non-medical contexts?

When was the expression, if not the concept, first used?