Having worked for one such company, who made a spectacle out of punishing disloyal former employees way past the point of what the legal system is built for (https://news.ycombinator.com/item?id=18499712 ), and then holding staff meetings to announce how they've just destroyed that employees life (he wasn't the first, and while he actually did break the law, it's very Arguable the Quadrature guys did not), I took the safe choice sitting out my non compete period and took a nice long holiday.
I'll repeat the most important part of this story;
You don't have to be guilty to be dragged into court.
I'll repeat here what I said there. A lot of engineers cannot work on projects in their free time due to being locked into horrible contracts that assert copyright and ownership over anything they do in their free time. Which has a chilling effect on engineers who would otherwise contribute to FOSS. Even if those provisions are illegal, it still costs a lot of money to strike them down in court and the court system is generally always stacked in favor of the corporation.
The process to enforce such a statement in UK would be for the past employer to obtain a court injunction requesting a past employee stops working for competition. I was told almost all such injunction requests are declined as unreasonable. The only exception is if the statement was severely limited by geography. So for example if the contract says: "you can't work for competition in 5 mile radius" it may be enforceable, unless your whole home town is 10 miles across and the statement basically bans you from working in your profession where you live - then no court will grant an injunction like this.
So why did employers put that into their contracts if they knew it can't be enforced? I think they did it to discourage employees from going to competition. Finding out that it is unenforceable requires some googling and one may have doubts about their specific situation. I'm not sure how it is now. My experience with this is over 10 years old.