Fully agree with the download OS bit...
+1 here as well. There needs to be a way to restore it completely to factory firmware, like how google releases factory images for its Nexus and Pixel lines for use through ADB, or how other manufacturers like Huawei allow restore from SD card etc.
I find the inbuilt factory reset method not alway reliable... To my understanding all it does is wipe the relevant partitions, whilst rest stays as is.
What happens if the problem is in the other partitions?