I have very little doubt that this is illegal at least in the US, as it would most likely be considered some sort of employment fraud, but what's funny about this idea is that I think it would've suited me just fine and accelerated my career. Hell, who knows if I would've needed to go to college all that much if I had this arrangement!
I enjoy your idea!
Really good point here, and I wish I said this explicitly in the piece. It seems tremendously important for society to allow people to specialize by paying them to do things. I think this point is well-understood in the economics of labor but not often articulated.
Your last paragraph is an excellent distillation of why it can be reasonable (or, at the least, immensely satisfying) to quit your day job and pursue your own project. I never understood my friends who sacrificed high salaries to do this until I realized that they are probably spending quadratically more time doing what they want and learning much more about their desired specialty in the process. While still risky, it does mean that they are likely much more qualified to pivot back to a full-time job in their new area if their own project fails or they tire of it.