simple serial reading ascii with ethernet but still wrong reading

I tohugth that the serial.write() would write to the device and then release the serial port.

No. The port is activated when you use Serial.begin().

In the same way, I used to think that Serial.available() is function that continuosly performs a polling on the rx channel only if there is any valid data.

No. The Serial instance is handling the arrival of data, but the available() method only checks, when you call it, whether there is buffered data to be read. It does not do any kind of waiting for a reply.

Waiting for one byte to be available would help, if the reply was one byte.

You really need a different approach. The serial communication needs to be considered asynchronous, like posting a question on this forum. You don't know how long it will take to get a response. So, the Arduino should periodically ask the device for data, and return the most recent reply it got when the client asks for it.