that final idea is genius, not going to lie. Building a PC hasn't really changed that much aside from some ports being renamed.
From what you told, just putting in a very light distro to your current laptop (like debian or lubuntu) on a new SSD could do exactly what you want; but if you don't think it'll cut it; a used thinkpad could do the job just well. Though its specs will determine how performant your PC will work.
A decent-ish Core i3 or Ryzen 3 series processor (or higher if you want) will do the job well, 8GB RAM should pair well with it, As for storage, using an SSD would increase responsiveness a lot and make the boot times faster. Since you have another computer, you can just install Linux using a flash drive even if the computer you bought came with Windows. Do not get a Celeron/Athlon processor, they're manufactured e-waste.
Laptops with discrete GPUs tend to be on the heavier end (as in weight), be aware if you're planning to get one. They're definetly more performant in graphic demanding applications, but from what you told me you likely don't need it.
As for distros, choose whatever looks better and not complicated.
BASED