For a lot of work it's standard practice to pay minimum wage and that's what most employers of such workers do. They don't make exceptions for a particular worker even if he has demonstrated surprising aptitude for, say, bagging groceries. Likewise, invention clauses like this are quite common, even the norm in some areas, and no company is going to make an exception for a particular worker no matter how valuable he might be.
Libertarian arguments like this which stress contracts often seem to fall flat by the following reasoning:
1 We seem to agree on what the desired outcome is.
2 If contract theory fails here, the outcome is undesirable.
3 If contract theory succeeds, the outcome is identical to what we would have achieved with legislation.
4 A legislative solution doesn't carry with it the uncertainly that a contractual solution would.
∴ Legislation seems preferable.
You have to know what outcome you want to effect of course, and be reasonably sure your legislation will achieve that. In this case we see (or at least strongly suspect) that when companies are not allowed to own IP produced by their employees independent of company resources and unrelated to their business, the financial benefit to the employee and the benefit to society in economic growth far exceed the benefit to the company (in most cases this benefit is zero). If there were a wider range of solutions I would not support legislation (or possibly I would support narrower legislation), but that doesn't seem to be the case. So I support legislation.