After tinkering with T's old laptop for a couple days, I've got a tentative diagnosis of what's wrong with it. It started misbehaving after a water accident -- a cat knocked water onto it. It looks like the spill damaged all the temperature sensors on the logic board, aka motherboard -- none of these sensors are returning temperature data. All the other temperature sensors inside the laptop are working. Without this logic board temperature data, the OS presumes that the logic board is overheating, and uses software interrupts to drastically slow down the CPU, making it unusable.
This is similar to what happened when the fan inside my own laptop broke, But the fan inside T's old laptop is fine. T's laptop isn't overheating, but without working temperature sensors, the laptop assumes it is overheating.
I spent a lot of time trying to defeat these software interrupts, and I succeeded, but there are still hardware interrupts that continue to slow down the CPU, because even the logic board's hardware cannot tell its temperature. These hardware interrupts aren't as bad as the software interrupts, but they slow down the CPU by somewhere around 85%. A 5-year-old laptop that is operating so slowly isn't worth anything to anybody.
I can open the laptop case and take a look and clean it up, but it probably won't help. If it doesn't help, then the laptop needs a new logic board. This would cost at least a few hundred bucks, when you can buy a working used MacBook Pro of the same model for not much more than that.
I might, as a hobby, try installing a new logic board myself. I was surprisingly good at replacing the fan in my own 5-year-old MacBook Pro, and now it is working much better. With the tools I bought for that fix, and the experience I gained (same model laptop), I could potentially install a new logic board. I could even upgrade the RAM along the way, heh.
-----
Back when T's laptop was first acting up, I wanted to try diagnosing the problem for him, but he didn't want to give up control over his laptop and he had a lot of files that he needed to backup. He just wanted a working laptop ASAP, so we got him a new one -- the old one was 5 years old -- most people would just get a new one. I asked him if I could have the old one after he transferred all his files, and when he gave it to me over the weekend I became intensely interested in trying to fix it myself.
But now I'm at a decision point. It probably needs a new logic board. I could try to replace it myself for a few hundred bucks. I could pay someone else to replace it -- but I don't even need another old laptop, what would I do with it?
I think first I'll pop the hood and take a look inside, see how bad it looks. There's a small chance that cleaning up the inside will fix the problem, but I don't expect it to. But looking inside may lead me to make a decision about whether to give up or spend some money on it. There's a logic board on Amazon Prime for $270, that's probably my least expensive option.
Or we just trash the thing. Or I use it like I use my old iPads, as an extra porn screen when I'm playing with toys. It does a fine job playing a porn video from the file server, while I use this laptop for other stuff ;-)