We already have an extensive infrastructure in place to protect the intellectual property and trade secrets of companies, including NDAs and those clauses assigning ownership of anything you produce to your employer. But the idea that companies can overstep this bound and place restrictions on how you can use your brain and your general knowledge to produce new, creative work that has only a secondary or tertiary relation to their IP is utterly vile.
If the technology existed to erase memories from brains, would these employers insist in their employment clauses that employees who resign must have any professional knowledge acquired on the job erased from existence? This is almost the same thing. If you are an engineer in a niche field, in particular, being barred from that field for a year or more is tantamount to rendering your professional knowledge obsolete.