Currently, my thought is that skilled trades are the least likely to be displaced, especially in maintenance, non-routine roles. There's currently a decent amount of research to automate the routine parts, though, like new construction.
Automation often does not reduce the requirement for labor, it only shifts the work and cost somewhere else.
Former plowshare-pullers become horse-steerers become tractor drivers. Each new invention does have it’s attendant complications, but they tend to be nicer than the basic, first job. Ie, I’d rather be a tractor mechanic than a plowshare puller.
I’m glossing over generations of social upheaval and re-skilling here, but that’s the pattern so far.
Despite all that there is still a lot of work to do. There wouldn't have to be, most of the work being done is something we could skip if we decided to let science/society stagnate at current levels. Most people have decided they want more.