Chosen Solution

My old mac shuts down when it gets hot. I suspect fans or dust inside

I second your suspect too, midsummer is the right season for it and your Mac has been around for sometime..I’d add dry thermal paste to the equation too :)

replace thermal paste :)