The SOS panic handler is exactly such a thing and the scheme I proposed in the other thread would build onto that in on a higher level.
To make use of the scheme outlined in your link above, you should be proficient in using OpenOCD and have a JTAG/SWD debugging hardware (e.g. Particle Programmer Shield).
But since I’m not aware of your individual experience with getting that low into the HW I tried to approach your issue from the higher level down.
This is where/how this is implemented in device OS