the law bans this kind of thing now (as of October 2018): you simply can't have a noncompete unless the employee is exempt from overtime.
even for an exempt employee, the MA law now requires 50% salary to be paid for the period the employee can't work.
i don't know if existing agreements are enforceable or not though.