Arduino resetting or malfunctioning when controlling 48V DC motors with relay module
There's a few things that could be causing your problems.
The most likely is that you're getting a lot of electrical noise on the digital input from the crane machine.  That noise is coming into the Nano over the limit switch wires.
You have the motor power wires and the limit switch wires in one bundle from the Nano to the crane machine.  The motors will cause a lot of electrical noise on the power wires.  With the power wires parallel to the signal wires, some of that noise will make it to the signal wires.
You need to first reduce the amount of noise produced by the motors.  There would normally be a capacitor across the motor terminals right at the motor.  If there's not one there already, install like a 100 nanofarad capacitor rated for 250V (I think that's the next higher up from 50V) across the motor right at the motor.
At the Arduino end, you need to clamp anything that makes it that far. Put a small (few hundred ohms to 1 kiloohm) resistor in series with the limit switch inputs, and a small capacitor (1 nanofarad or so) from the digit input of the Nano to ground.  While you are at it, put a Schottky diode from the digital pin to the Arduino 5V.
Another thing you could do is to use a shielded cable to run the limit switch wires through.  A shielded cable has a braided conductor around the signal carrying wires.  The braid is connected to ground.  It prevents electrical noise from getting into your signal wires.
Try to neaten up your wiring - keep high current conductors away from low current signals.
Keep in mind that breadboards have very limited current carrying ability - don't use the breadboard as a junction for all of your ground wires.
Breadboards are also prone to bad contacts - vibration may cause sporadic loss of power or other connections to the Nano, resulting in erratic behaviour.