I just did exactly that. I had an old i7 with 64GB of DDR4 that I bought when it was cheap. DDR5 was so expensive I just bought an AM4 and moved the RAM over.
My MacBook is showing its age, though. Hearing that 2027 wont be any better makes me hopeful all the vibe coders can ask for memory efficient implementations to stretch existing hardware a little further.