You mention factory jobs and assembly lines. Firstly, let us think if the large part of these kind of jobs were supposed to be for human beings at all. What I mean for human beings is, are these jobs utilizing, for example, creativity, critical thinking, analysis, or any other kind of more deep mental activities that a human being has developed from million years of evolution and is capable of, well the answer is: NO.
That is so, because the nature of work was shaped by criteria such as effectiveness, productivity  as one can see from the early works on the principles of work management. That was the start of the first industrial revolution and many traditional crafts demanding multilateral personal development and skills from many fields, whose complexity was ensuring a stable place in the market, were exchanged for monotonous work involving few simple moves on the assembly line, that slowly converted man into a machine, making him dispensable, but even worse making him unable to do anything else as his real skills remain undeveloped and his true capacity unutilized, a good example of I mean is Charlie Chaplin's "Modern Times":
Thus, the jobs that were meant initially for machines are now rightfully being done by machines.
But what happens to all these people that don't have jobs and contribute to the high unemployment, which in turn contributes to the lowering of the wages and so on...
Just think about it, after two industrial revolutions and some much scientific development instead of less work people need more work ONLY to maintain their basic human needs!
Well, it is time for people to claim what they deserve, it is time for radical changes, for example, lowering the 8-hour working day to 4-hour working day, this is already gradually introduced in some countries , while keeping the wages the same, in this way one can, not only, double the workforce, not only eliminate unemployment and avoid loosing one more generation of young people, but double the enthusiasm, the time available for spending, travelling, and many other activities that will facilitate the economic growth and well-being. In other words, it is time people demand what is rightfully theirs: right of decent existence, even without a job, i.e. basic income, like for example in Switzerland . Changes should be made in the educational system in order to stop the "production" of professionals with no real prospect for work, but even more important without perspective for meaningful social contribution, i.e. dead-end jobs. Lately thoughts are being expressed in the direction that there is a good chance we end up with a universal basic income due to automation. 
Finally, once we transition to fully renewable energy production and consumption, the developed part of the world works for helping the rest of the world and closes the gap, which surely will guarantee a lot of future work, people should start doing activities related to their intellectual and spiritual development and aim higher, for reference check the human being named Elon Musk and his view for the future. 
P.S.: I strongly believe that there is a "critical mass" of people similar to the above mentioned that will contribute towards an Utopian future in which people will explore the mysteries of the Universe rather than burden their soul with issues like job insecurity, which will be a thing of the past.