I'm pretty sure at least two other people have made this chost but I'm going to make it too.
If you live in the US, you can get skylake generation quad core office PCs for the same price as a 4GB raspberry pi. When you include the cost of a quality power adapter for it, you start getting into kaby lake or even first gen ryzen systems. Most of these come with 8GB of ram minimum, sometimes 16. They can be upgraded. You can get 1L PCs if size matters, or you can get SFF or Mini Desktop systems if you need expansion. They are way, way cheaper than raspberry pis when you start wanting to attach non USB IO.
They do not have GPIO. They use a lot more electricity. They're not the ideal choice for every situation, and pricing can change a LOT if you live outside of the US. But they are basically scrap on the way to the landfill that can still do a ton of stuff, and do those things for many years to come.
If your jobs are small enough, a pi really is the best choice.
I have an old haswell era box running my NAS right now. It's more power efficient for me to run small jobs on an entire Raspberry Pi than it is to run a VM on the NAS box. Pi draws what, 5-6w under load (stock pi 4) but when something asks for CPU time on the NAS box it soaks up an extra 25-30w. It's not as fast, but sometimes that just doesn't matter. The delta for this particular job isn't like "twice as fast", it's like 30-40% tops, maybe less.
If you REALLY want to get into watt pinching I'm sure you could argue the idle power use of the Pi, even though it's doing some other very very low power jobs, vs running it in a VM, but I'm pretty confident that the efficiency delta is big enough to make it worth the job.
The only real problem here is this is an 8GB model I picked up when it was new and the whole system uses maybe 600 megs tops. Oops.
So yeah, 1GB Pi 4, still $35, zip tie it to the cardboard box it shipped in and use the good USB adapter you already have laying around. If it wasn't for the blasted ethernet speeds I could probably get away with a 3b for this.