I use an external USB HDD for the majority of my pi projects which will tolerate power interruptions.
The majority of SD card corruptions occur when there is a power interruption in the middle of a write operation. Reducing this activity by moving it to an HDD/SDD that can be effectively fsck'd will substantially reduce the chance of SD corruption.
The first step (which in retrospect didn't help) is to configure your bootloader with POWER_OFF_ON_HALT=0 and WAKE_ON_GPIO=1 (I think the latter forces the former). Your RPi will never be fully shut down in this way, but it won't power down during a reboot either.
The next thing you could try is updating the bootloader with sudo rpi-eeprom-update, and ...
I resolved the problem. It was a misconfigured /etc/fstab file. For whatever reason, the pi refuses to boot when there is an error in this file. I was able to repair the problem by mounting the SD card on a different Linux machine and edit /etc/fstab there. I only managed to figure it out by borrowing a monitor and seeing the messages displayed during ...
It is possible that your SD Card gets weak over a long time. The problem is that SD Cards doesn't report read/write errors to the operating system. It could be that you can flash it but then it looses some bits and bytes after some days possibly still the same weak cells so the symptoms are always the same. You should consider to use a new SD Card.
It works (at least in 2019)
But there are two ID on a partition, the UUID and the PARTUUID wich are different.
You can find them with the blkid command.
On my system, this gives :
$ blkid /dev/sdb1
/dev/sdb2: LABEL="root" UUID="ba0d4dc4-18e9-42ff-81e6-077510abdb79"
TYPE="ext4" PARTLABEL="primary" PARTUUID="3c8e2158-0bec-445b-9fa0-0d
The debug messages you are asking about are on a stage where only the boot loader is running but not even the kernel is loaded. So there is no chance to have logging to a file because there is nothing what managed it. But you can enable the boot loader to output messages to the serial debug console. For this you need an USB to TTL (RS232) serial cable. An ...
It is known that the Raspberry Pi 3 may have problems with some devices to boot. But you can use a special bootcode.bin-only boot mode. This will use a SD Card containing only the file bootcode.bin. Once bootcode.bin is loaded from the SD card, the Pi continues booting using USB host mode. How to setup this you can look at Raspberry Pi boot modes.