The nation’s top doctor has described how he was “terrified” the NHS was going to be overwhelmed as officials drew up an unpublished document describing who should be prioritised for care if the service exceeded capacity in the early stages of the Covid-19 pandemic.