In my opinion, these types of agreements should only be allowed if they come with some sort of golden-parachute severance package. Preventing people from working in the fields they are most useful and experienced in once they depart a company (either willingly or not) only benefits their former employer. It doesn’t benefit the employee, hurts competition, and is also (likely) a drag on the economy.
Getting rid of these is a victory for the average American.