Is it possible to design a system where you have one Arduino connected to a DB9 adapter (and a serial device), and have the Arduino take the commands, send them over Wifi (or cellular) to another Arduino that will receive the data and output it to another DB9 adapter (and device), and it's like the two devices are physically connected to each other?
Yes, but if it really works as expected depends on how fast the link has to be, concerning latency.
If the distance is only some meters, you might take a look at HC-05 Bluetooth modules.