I guess you can call that smart. But it is also dishonest. They are effectively stealing from their employer. Many people seem fine with that, justifying it with the notion that their employer doesn't adquately utilize their skills, or is stupid to trust them so deserves to be taken advantage of, or didn't know how valuable their IP was so it was ok to take it and start a company around it.
I've known quite a few people who did this, even a couple who went on to found billion dollar companies while on the payroll and using company resources.
It's a different story if the boss says spend your free work time doing whatever you want, or develop some skills of your own choosing. In my experience that's usually not the case.
It's expected that the employer is going to fuck over the employee when it's convenient (you're naive to think otherwise).
You're putting yourself in an unfair (one-sided) position by deciding that you have to behave nicely towards the company.
I think most people who have worked for a number of employers find a range of relationships. Some will take advantage, some will nurture, and with some you are sort of neglected.
Regardless, if what you say is true then as an employee your choices are to be honest and taken advantage of, or dishonest and taking advantage. Maybe there are more options, including some that don't involve being dishonest?
Also, the relationship has at leaast 3 parties: employer, employee, boss.
The employer doesn't know or care about individual employees, but may have a disposition towards or against bulk layoffs in various circumstances.
The boss does know the individual employee, and may personally like or dislike them (in addition to having some impression of their performance level).
The employee just needs to not piss off the boss, and not appear as deadweight (and optionally, impress the boss enough for protection from semi-discretionary layoffs).
Employers will not fuck over employees "just because". They're mostly rational enough to be predictable.