The application is to accept data from one serial port, process that data in very, very simple ways, then output data on the other serial port. The average data rate is much lower than the bit rate of the serial ports, so very little buffering is required. A small program - maybe 100 to 200 lines (not counting serial port and start up code).
i'm guessing you want is to no longer do assembly in-house?
while you are unlikely to find anything pre-made that fits all your requirements, there are any number of small businesses (or individuals) out there who could throw together a design that fulfills your needs, and is a fraction of the cost (per unit) of the many hundreds of dollars for what others have been suggesting. they may also be able to complete assembly to the closed-box stage for you.
a few questions:
1. what is the box to be powered from? an existing 5v/9v/12v source? please specify lower and upper limits. are you happy for there to just be a barrel jack on the side for power in?
2. are you OK with 2x DB9 plugs or sockets for the serial ports?
3. do you prefer the box contains an arduino NANO, or a raspberry pi PICO? in some regards the PICO is a little easier to work with, but on the other hand you may wish to retain your existing code and so go for a NANO. PICOs have one big advantage today in that they are readily obtainable.
4. the box would additionally have a hole in the side for uploading firmware, as well as possibly a push button for selecting upgrade mode.
whoever designs this for you will lay out a PCB that is shaped to fit an existing enclosure with removable ends. such as this one for example:
https://nz.element14.com/hammond/1593lalgy/enclosure-instrument-abs-grey/dp/3276681there will be two DB9 at one end, and power in and USB cutout at the other. the NANO or PICO will plug into the PCB. it is highly likely that the PCB manufacturer will be able to also load components. see, for example:
https://jlcpcb.com/smt-assemblyi believe JLCPCB can also patch-mount a PICO if you go down that path.
is this getting close to what you are after?
cheers,
rob :-)