Detect an unknown communication protocol and read data on it
Although you tagged this I2C and SPI, since this is a factory environment, those interfaces will not be used for long distances in such an electrically noisy environment. As commented by Juraj, one possibility is RS-485, although there are other possibilities like RS-232. We would get a clue from seeing the exact cabling using (e.g. twisted pair internally or not?)


  I've used Master Writer/Slave Receiver technique from docs but it returned -1 and didn't make sense.


Since that interface won't be I2C, and you haven't said that you identified any of the signals on those 3 wires, then I recommend that you stop guessing by following that I2C tutorial. You could damage your Arduino's I2C interface, by connecting it to signals which are above logic-level voltages (e.g. the higher-voltage range of RS-232).


  The problem here is to determine which communication protocol the 3-wire data


It's not going to have 3 data wires. More likely is Tx, Rx and Gnd or Tx/Rx+, Tx/Rx- and Gnd.

FYI, you will need to buy/borrow and use a logic analyser as part of this process, and it might be necessary for you to use an oscilloscope too (depending on what you find in part 1 below). I saw you mentioned in a comment that you are now buying a cheap USB logic analyser, but note that an oscilloscope might still be needed.

The overall process I suggest you follow, has these stages:


Identify the electrical interface


Look at the electronics on the "section boards" and the "main processor" which you mentioned. What ICs do you see, which are connected to this external interface? Do those IC part numbers help you to identify the interface type?
If you can't identify the ICs, then at least identify whether one of the wires is Gnd (likely) and then use an oscilloscope to view the signals on the other two wires, to find the amplitude (are they bipolar or unipolar? single-ended or differential?). Those results will help you identify the electrical interface being used.

Analyse the protocol on the interface.


Electrical interface standards like RS-232 and RS-485 don't specify the actual protocol used to transfer data on that interface.
You need to find a way to capture the data (e.g using a logic analyser, if necessary via a suitable interface IC, depending on what you found in part 1 above; an oscilloscope may still be useful too). Then look for patterns in the data - timing patterns, numerical patterns (especially at the start of each data transmission), and any other patterns you can see.
Since there are multiple "section boards" then a good starting hypothesis is that there is some kind of addressing involved, so that the "main processor" can select which "section board" it is going to collect data from. Look for switches or other address selection on these "section boards" to help confirm or deny that hypothesis.
Can you identify whether this is a polled design e.g "main processor" sends out some kind of request, to a specific "section board" using its address? Other system designs are possible, but it all depends on what you see on the data lines, when you get that far.
I have never been involved in a textile factory, but research the equipment make/model online, to see if you can find any information from other people who may have publicly shown their research, after interfacing with similar machines.

Use the correct electrical interface (from part 1) and your understanding learned about the protocol (from part 2) to then write a program for an MCU (e.g. you mentioned Arduino) to monitor the data being returned to the "main processor".