Factory Reset Options for Photon

I am having a problem with a photon (internet button), and I would like to reset it to factory settings.

The problem that I am having similar to the one explained in the topic called “A possessed Photon”.

I got the photon maybe couple years ago, played with it little bit. Recently, I started paying more attention to the IoT systems again and brought back my old photon. It was working OK but after a few program updates during my tests it started not to upload my latest program.
I tried flashing the bootloader and tinker (seems to be uploaded OK), but nothing changes. Still the old program is running (I can tell that because it is blinking the blue led, and posting some values to the cloud which is coming from my old program).
I can ping and signal the board but cannot upload a new program to it. I also used the device doctor but it throws an error.

Here is my post related with this issue: A possessed Photon 😱

Any ideas? Thanks in advance.