Are you sure it's hardware?
Are you sure the glitches the 2009 Macbook has are really hardware-related? I haven't used a Mac since the SE/30 back in college, but with my PCs, I'd definitely nail down the problem as hardware before even thinking about buying new (unless I was using it as an excuse to justify something shiny and new, of course). While I am not one of the Windows guys who believes that reinstalling Windows is a normal and expected part of maintenance (I haven't done a maintenance reinstall of Windows since 95), installing a fresh copy on a spare HD and seeing if I can reproduce the crash/glitch/whatever is always a possibility. Is that sort of thing possible with OSX/MacOS?
I have a 2008 Core 2 Duo laptop (Asus) that is still running strong, and while I have had a few glitches (namely Nvidia drivers that are supposed to be for my Tesla GPU, but cause bluescreens with any version later than 258, which is dated July 2010), it's rock stable now with Windows 7 x64 and Mint 18 x64. I know laptops are not thought of as being upgradeable the way desktops are (and they're not), but this little guy was working so well (and the Core 2 Duo platform still good enough for what I need a laptop for) that I was compelled to upgrade it rather than replace it. Something about having a computer that old holding its own in 2016 just speaks to me... perhaps it is my contempt for the "planned obsolescence" economy and the scourge of throwaway items that are too expensive to really be treated as disposable.
My Vista-era laptop, which came with 3GB RAM, now has 8GB (max of 4 specified by Intel and Asus-- complete nonsense; you just need to put in the right type of SoDIMMs), a significant CPU upgrade (2GHz T5750 to 2.60 GHz T7800), an upgraded GPU (GTX 220M on the flipped Asus MXM), a 1TB SSD, and a new Mini PCIE wireless card (the Intel one never did get a stable driver before Intel EOL'd it).
Like the Macbook in question, it had several keys on the keyboard that refused to work, but I got a brand new keyboard for it for $15 US, shipping included, and it works perfectly. That's one thing I have never liked about Macs-- the price of replacement parts (though I am certain that if I'd called Asus for a price, it would also have been far higher). Maybe you can find a new or good used one on eBay that won't cost a small fortune.
It's a shame that Apple seems to be adrift. I've never cared for their products personally, but having competition is important, and with MS determined to destroy the Windows franchise with the unusable Windows 10, this is the first time I'd ever actually recommend a Mac to anyone who wanted a laptop or desktop and just wanted it to work out of the box. I can't recommend Windows anymore in good conscience, and I know that most people would not do like I would and slap an older version of Windows on a new PC (as I did with my Asus laptop the day I bought it-- Vista came off, XP went on, and it would remain so until about a year or so ago).
I keep hearing about how Microsoft is innovating now, but you have to overlook so much bad stuff to even get to the point of appreciating the relatively meager selection of positive things Windows 10 has to offer (in terms of software; there's no way I'd go near any of their locked-down hardware, innovative or not) that I can't see it as a viable option. A lot of the innovation seems to be in Microsoft thinking up new, innovative ways to annoy and alienate their long-time customers. I hope Apple can turn it around and give MS a run for the money.