If you're going to swap parts, change the cable first. Its cheaper, easier, and typically the one to go bad vs the sensor board.
Or, remove the sensor cable and flip it around (plug the esc end into the motor end and visa versa). If the problem continues, see where you have to wiggle to make it work again.
If its still a wiggle at the motor: board is bad
If its a wiggle at the esc, cable is bad.