Do you know how many problems would be solved if the nation wasn’t run by workaholics, but by people who expect to retire at a reasonable age, while they still have some life to live?
57 is the oldest we should elect a president to their first term, so they are done with gainful, serious work by the age of 65. The only work someone over 65 should be doing is profiting from enjoyment of a useful hobby.
My first thought (which probably isn’t the best method, but I’ve done similar before) is an Arduino between the mouse and the system. The Arduino normally just passes the mouse commands to the system, but it listens for the button and blocks movement if it sees the button press.
Because it’s all done in hardware, this method would be system-agnostic. You could plug it into anything.
I used a Teensy 3.6 for a similar project.