AI is destroying jobs, but it’s also making it safer to work