A proper transmission line would definitely be better, but I'd need to remake them and it'd take 16 RS-485 transceivers -- one in each sensor and 8 on the main board.
That is not the way RS485 is supposed to work.
Normally you only need 9 devices. One for each node (that is
![Cool 8)](https://www.eevblog.com/forum/Smileys/default/xcool.gif.pagespeed.ic.cOxV6sPNRd.png)
and the ninth is for the "master", and then you daisy chain all the nodes on a single cable.
I'm also weary of Maxim chips. They have a reputation of making quite nice specialized chips, and after a bunch of years they get progressively more expensive and get obsoleted. I am more for buying more standard chips that are interchangeable between different manufacturers. RS485 transceivers have a quite common pinout (in the 8-pin chips), but there are still two variants "Full duplex" (which you selected) and "Half duplex" (where a single wire pair is switched between send and receive)
The Maxim chip is also quite expensive.
If you go to:
Digikey / Product Index / Integrated Circuits (ICs) / Interface / Drivers, Receivers, Transceivers and then filter for "RS485" and then sort on price, the "Union Semiconductor" UM3483EESA comes out on top and it costs 88ct. (Moq 2pcs).
https://www.digikey.com/en/products/detail/union-semiconductor-international-limited/UM3483EESA/13926072If you are interested in this, have a look at Modbus RTU. It's a fairly old, but standardized and open bus protocol and it's still popular. Because of it's openness and ease of implementation it's used from industrial to hobby uses. There are plenty of "arduino" level libraries available.
Another good option is to use CAN. Most STM32 have an onboard CAN controller, and it looks like ESP32 also has CAN hardware. Result is, you write your data to some buffer, and then give the CAN hardware in your uC an order to do it's thing while you wait or go do something else. CAN is a quite sophisticated protocol. It's main disadvantage is a quite small packet size of 8 data bytes per packet.
CAN is basically a wired or connection. The (twisted pair) bus wires are pulled together by the cable termination resistors (termination resistors always work on the cable, not on the nodes!) and this is called the "passive" state. When a CAN node sends a "1" bit, it pulls the wires apart. One to GND, and one to it's power supply (usually 5V, but can be 3V3) and this is called the "active" state.
If you want to make your bus really robust, then you can add extra bipolar TVS diodes between the bus wires and GND, and also add PPTC resistors in series with the bus (and possibly power) wires. The TVS diodes diodes give extra ESD protection (also helped by the cold resistance of the PPTC's.) and the combination with the PPTC also protect your circuit against gross wiring faults, such as setting a 24Vdc voltage on the bus wires. In this case the TVS diodes clamp the voltage to a level that nothing gets damaged, and the PPTC devices limit the current to a safe value, so your TVS diodes do not overheat and die after a short while (seconds).
And I still don't completely understand your use of optocouplers. How do you power your remote nodes? I guess it's from the same long cable. Do you also use isolated SMPS modules for this, or are the ground pins of your uC's connected to the GND of your wiring?
Both CAN and RS485 have special feature to handle this. Their "common mode" goes from (about) -7V to +12V (which is 7V above it's 5V power supply) The negative common mode voltage is important and it goes like this:
Suppose you have a long cable with daisy chained nodes, and the cable receives 24Vdc power on the left side. All the nodes draw a bit of current, and the cable is so long and it's resistance so high that it has 3V loss over each power conductor. That means (measured from the power supply, that the power on the "right side" of the cable is 24-3=21V, and the GND at the far right side is 0+3 = 3V.
So if the leftmost node sends a packet of data (0V and 5V signalling) to the rightmost node, then the rightmost node receives data between -3 and +2V. If data is sent from right to left, then the leftmost node receives it as a 3V to 8V data signal. Both of these situations are perfectly fine for both RS485 and CAN. The transceivers are explicitly designed to handle this.
A good Application note for RS485 is "10 ways to bulletproof RS485"
https://www.ti.com/lit/an/snla049b/snla049b.pdf