Apparently this was caused by accidentally writing 0x0 to AXP192_DCDC13_LDO23_CONTROL which turned off DCDC1 which provides power to ESP32 chip. The behaviour I was seeing was normal boot and then the firmware turning DCDC1 off.
I was able to revive the M5StickC by connecting G0 to GROUND and randomly doing short and long power button presses while trying to erase flash. After few tries erase flash command suddenly succeeded.