Automation and sectoral reallocation