It's risky business, though, as code of course gets reviewed a few times (at least at Nextcloud). If it gets detected once ppl are put on notice. If somebody can squirrel out that the code came from a competitor, a lawsuit is waiting... And just imagine the bad publicity it causes.
Besides that, it is unethical and I wouldn't want to work at a company that pulls such stunts. I think a lot of people wouldn't. It'd be hard to keep secret, too, I mean, 5 years later the employee that was asked to do it works somewhere else and BOOM.
So all together, I think it's extremely unlikely to happen.
I CAN imagine a disgruntled ex employee or angry employee at a competitor would pull something like this. We have seen employees at a competitor create social media sock puppet accounts to spread FUD about us - but management at the competitor put a stop to that once we notified them.