There’s already things that can automate home building, such as the brick laying robot or 3D printing concrete.
Stick built homes could be partially automated using a factory that builds all the walls, headers, trusses, etc for a build that then gets shipped to the site. The factory part is where this shines as conditions and operational parameters can be better controlled than out in the field.
This could satisfy your health and safety aspect too as there is still a need for some people to oversee automated machines to correct issues they may have, and people who are aging out of field work or need light duty can go into the factory as machine operators (assuming the site crews live/work near the factory).