Yes, it's quite possible.
Your example of a machine that assigns the work already exists. For example, today, couriers who carry letters from one end of the city to the other are often guided by systems that use artificial intelligence and that decide who will carry a given package. There's no longer any human contact between the dispatcher and the person performing the tasks.
As technology advances, obviously more and more of these jobs, especially the more routine jobs, will be automated. In the courier example that I just provided, the dispatcher's job was the most routine and easiest to automate. The work of a human who walks the streets of the city is more difficult to automate at the moment. However, it will probably happen eventually.
It's very important for governments to plan, anticipate the future and think about measures that will minimize the human misery that may result from this development if it were left to run its course.