USB Device that acts like a printer
You could just purchase commercial products that do this. But rolling your own is possible. An ESP8266 would be too limited for this. It's meant to be a serial to wifi adapter with some extra GPIO. Instead, a computer with usb OTG or peripheral ports and linux using something like USB Gadget Printer drivers that allows you to emulate a printer to the host computer. Obviously this will require some intermediate to advance coding to figure out. Once you have that set up, the print data can be forwarded, as it's likely in a standard PCL format. The time and skill needed should be compared to the commercial product cost.

See: https://unix.stackexchange.com/questions/408293/how-to-make-g-printer-usb-gadget-printer-work-in-raspberian-pi and https://learn.adafruit.com/turning-your-raspberry-pi-zero-into-a-usb-gadget/other-modules and https://forum.armbian.com/topic/1359-bananapi-installing-the-gadget-printer/