So, you got a winner
That's why usual methods such as SMC reset and other tricks gave no result with your issue. There must be some protection in firmware which puts your mac to sleep/low power mode when CPU temp is reaching critical value. I bet that after replacing failed fan your issue will be gone.