A company I worked for (property appraisal company) got acquired by another company. They forced one of the higher up developers out. 6 months later that developer wrote an app dealing with lines at Disney and was making money on ad revenue. The company came after him claiming they owned it because he used skills and knowledge he gained while employed to write that app. We had a "everything you do at any time belongs to us" contract.
He was at the original company for 15 years at the time and was the 2nd developer at the company. So he had a lot of friends at the company and he told his friends at the company that he made this cool app and word got around because everyone thought it was harmless to repeat.
They got acquired by another company and then gutted, most of the management that did that got thrown out after anyway so I don't know how much it matters.
That being said I always read my employment contracts now.
So it does actually happen.