The average joe (the people that are currently in the low-skill labor jobs that are getting replaced) does not have the skills or the intelligence to become an engineer, work with science or math.
I'm not suggesting that we retrain a mass population of labourers to become engineers, that would be infeasible. Taking the example of an automated self-checkout at a supermarket; rather than retrain a checkout worker to become an engineer capable of designing new self-checkout machines we instead modified their original job and retrained them specifically for that. In my country we typically have 1-2 employees per set of 5-10 machines. Their new job is to supervise the customers using them, giving assistance and preventing theft.
not all of these people can be retrained
It should be getting easier to retrain people since we're getting better at designing products. Courses on product design typically introduce affordances, mapping, feedback, and constraints. These all focus on an intuitive and easy to use product. The same can be applied to designing easy to maintain machines.
and the robots will eventually be prodused and constructed by robots themselves
I haven't worked in a factory or assembly line so take this with a grain of salt. We may have robots already assembling parts for other robots but that doesn't mean we're close to robots being able to autonomously design/build/repair other robots. For designing a printed-circuit-board, you'll find a trained human still superior to a machine. For repairs, trained humans aren't constrained to identifying a select few known issues, they can interpolate in ways machines can't.
While it's true that the demand of maintenance works have increased it however does not increase to such an extent where the people that lost the jobs could be re-trained to do the maintance work, overall the workforce needed to produce the product have decreased.
Agreed, though I'm not sure we have a good solution to that yet.
there is simply not a need for the production to increase (suplie and demand) and when less and less people have jobs to support themselves less and less products will be needed to be made sins people can no longer affort them.
Often there isn't a need for production to expand. I just included that part because there have been instances in the recent past where we've made artificial demand for labour. I think it's China that has lots of spare housing because they ordered the construction without having people to populate them.