from what I was able to figure out, it is directly related to the quality of the SD card.
In the tutorial I am using to create my pi based server, I am migrating the boot, except the initial booting table and initial settings, to my hdd, in order to limit the number or R/W to the SD. In any case, a good periodic backup of the SD will also minimize the data loss of a corrupted SD, and you only need to change the SD cards and reboot