Probably afm(s) dying coz it happened to me, same symptoms.
Only difference being i could still start the car every time, it just wouldn't idle for longer then 30sec
Could possibly be fuel pump too like you said, that might be a reason you saw the cat light flashing. Coz the fuel pump was dying making the motor run lean and making the exhaust gasses hotter