On your tractor you have 2 safety switches, one on the shuttle and one on the PTO, next time it clicks, try moving the shuttle lever and then the PTO lever a bit and see if that does it, might need to get a new switch for it.
It could be the starter relay is going out.
Other option would be that the starter is going out, the solenoid on it can get worn out then it won't engage the starter motor.
The WSM has a very good walk through on how to narrow it down, it's in S.9 .