How technically possible? cuz I also don't see how likely such a case could even occur or the whole idea of it occurring to start with
That contract will typically stipulate that everything you produce whilst an employee belongs to your employer.
More forgiving contracts will limit this to just things created on company time or using company resources.
If you turn up at work and use your work machine for a side project, your work owns the IP you create in that project. Period.
Universities used to require undergraduates to sign something similar, but that's fallen out of fashion.