The question in this link makes the assumption that the work you do at a private company and the work you do at a university for a Ph.D. do not intersect (or have very little in common), thus the person asks if "it is too much work or stress" to do both. This question (and its answer) got me to think of another related question.
My Question: I'm wondering if the research you do for a private company can be used towards a Ph.D.? For example, suppose I work for a private company X and I have been accepted into the Ph.D. program at university Y.
Is it possible to be paid by company X for your research work, but at the same time use that research work to publish a paper along with your advisor at university Y?
I think I already know the answer to the question: It's possibly only if your advisor at university Y and your supervisor at company X have a strong relationship of many years and trust each other.
But I'm wondering if there are other answers?
Some background information about me: I have 10+ years of software engineering experience. I have a two B.S. degrees (Computer Engineering and Mathematics), one M.S. degree (Software Engineering), and a 2nd M.S. on the way in 2020 (Electrical Engineering). My plan is indeed to pursue a Ph.D. in Electrical Engineering in 2020.