HTC One M8 Factory Reset not working
The issue appeared to be the built in /sdcard filesystem had become suspect and was being mounted read-only. Rooting the phone could probably have resolved it but it was still under warranty - so I just had it replaced.