In reality, though, the use cases where you need Linux and GPIO are very slim. It's overkill, an ESP32 is realistically more than powerful enough, and Linux isn't even good for GPIO.
I've even found routers in the dumpster, that can still run actual OpenWRT comfortably.
I've had a couple of RPI's running as home file servers for well over a decade with the only reboots being due to power failures. But today, the cost sensitive option would be a refurbished mini-PC.
It controls whatevwhatever hardware, reads some sensors, etc.
Then when needed gets oders from a normal computer over network or BLE via some simple protocol.