First off disconnect the switches to proove it is the switches.

Next [ should be last but it easier to do ] go to Config > general config and in the top right there is a box called Debounce Interval probably set at abour 20 or 40, up that to 200 and retry in steps of 200. Don't worry about large numbers it's in microseconds per square sandwich or something.

If by the time you have got to 5000 it doesn't do anything, rewire the limits with shielded cable but only earth ONE end of the cable, best to do this controller end.

Wire the switches in sections if you can and use normally closed switches, DON'T wire the switch to earth, wire it back to the board and make it open for limit.