You may get better results if you do not nest the read and write function calls as you did. That is, read everything then write everything.
The reason for this is that softwareserial.read() returns 1 character. If you immediately turn around and pass that character to softwareserial.write() you will devote the resources of the processor to sending that character. In the meantime if another character is sent to the processor the processor will not see it or will only see part of it.
That said, you will likely get better results if you use a better embedded processor with dedicated serial port hardware for each port your project requires. Such as the Mega 2560 processor on the Arduino Mega.
Moving away from a cheap processor to one with enough hardware is a valid solution. Because, with another hardware serial port, the processor is only needed to read & write a character to & from the hardware using one command for each of these operations, not waste time reading & waiting each bit of a charater. A hardware serial port or UART can cut the effort of receiving & sending a character by the processor by more than an order of magnitude.