At least in theory, any judge that saw clauses like that should throw it out for that reason alone in those jurisdictions.
Companies are really banking on people making the value decision that doing the legal stuff is too much work, time, and money, so they're hoping for self-enforcement. It's the same reason we still see companies commonly doing things like terminating employees before maternity leave. They know a new mother (who is now jobless) isn't going to bother with the trouble of a potentially multi-year wrongful termination suit.
"Just semi-retiring" is a pretty sensible option at some point.
In my experience, the more the employer puts up a show, the more unenforceable it is.