Italian here. This kind of non compete agreement are legal here as long as the employee gets compensated with a raise high enough to justify the terms. So a judge may rule in favor of the employee if the contract is too strict or if the pay raise was not high enough.
It seems fair enough doing that way.
Your assumption that “using reflection means the code is wrong” seems a bit extreme, at least in .Net. Every time you interact with types, you use reflection. Xml and Json serialization/deserialization uses reflection, and also Entity Framework. If you use mocking in test you are using reflection.
We have an excel export functionality on our sites that uses reflection because we can write 1 function and export any types we want, thanks to reflection.