Survival and extreme statistics of work in steady-state heat engines