Problem solved!
I disassembled the Macbook Air and removed the logic board, but after close inspection there didn’t seem to be any corrosion or liquid damage.
I removed the heatsink and found that the original thermal paste had dried up and it came away in little chunks. There was probably little cooling at all.
After cleaning heatskink and processor, and applying fresh thermal paste, the Air booted up next time and seems to be working fine. Temperatures are normal even under heavy workloads, and I haven’t had any sudden shutdowns since. It’s been a couple days now and it looks to be working well again.
Seems like a logical fix now, but I hadn’t thought of it earlier. Would recommend it as one of the first things to look for on older laptops.
Thanks for your help.