What does the pi do? Feels like something that could get replaced with an ESP32 if it needs to be remote or just an ftdi chip or some other usb to gpio if not

It's what I had in the drawer.