Yes, but the headline asks "should", and I answered based on the case of how things are now and as far as I'm concerned if a company doesn't at least do 'a' AND they do not pay their employee for all hours worked (none do in my experience), they have no leg to stand on and should be thrown out the door without any further comment. In other words, employee is innocent until proven guilty. In reality it won't go down that way, but often does.
My actual opinion is that my option 'a' should be illegal and unenforceable (i.e. the employer only owns what they pay me to do), and as a matter of law investors should be aware that employees are not fully invested (fwiw, we're not anyway). In every place I have ever worked, 'a' is how it is done. Of course, I have never known people to actually adhere to it, they just hide is plausibly well.
This leaves employers with the option of hiring the necessary labor and/or paying for the work they need done and having strictly defined hours during which they own that employees time. This is the best, cleanest option, and the one most in keeping with the concept of employment. It's expensive, and it may be inconvenient, in urban areas it creates significant problems, but some can be mitigated.
The other alternative is being left with a court battle to prove that employee moonlight project was created as a direct consequence of work he was paid to do and therefore not his work. This would require specifically stating what work the employee is being paid to do. Proving this is not totally straightforward in all cases. But, and this is the best part, it does leave both the employee and employer in a state where they cannot be certain of the outcome and should prepare for any possible consequences. Employers would need to decide whether it is worth pursuing, which is basically the probability of winning/settling profitably. Cracking down on open source type projects would be unprofitable, for example. Employees would have to decide if their idea really is competitive or too work-relevant, and weigh potential consequences if they intend to become super rich entrepreneurs from the effort.
I have often considered writing some open source tools to replace the highly expensive, bloated crap I get from certain EDA manufacturers. I have resisted it since it really is too close to home (although strictly speaking, my employers are not in the EDA business) and my employer also owns everything I do. However if I did so, it would be open source and would probably be destructive to these companies whose existence is largely through parasitic and harmful maintenance contracts. On the other hand, it would absolutely lower the investment barrier to entering the market I am in where burn rates are measured in the 10s to 100s of millions a year (about half of which is in tool licenses and maintenance contracts), and enable more competition and product variation. Given a) the EDA companies in question tend to be large shareholders of my employers and b) my employers never want more competition, option 'a' above enables a perfectly anti-competitive setup and is actively harmful, even if the employee has no particular interest in greed, he just wants tools that work and obey 20 year old standards, dammit. But, I have little doubt that if I did this I would be squished like a bug, even if I went out of my way to conceal it.
This is just one way corporate ownership of employees lives is objectively harmful, even if one rejects the notion that employees should not be bound to their employer by anything other than delivering what they are paid to deliver.