Hi It could be any component in it goes bad with heat moving a solder joint or component failure due to resistance change!
Could be something simple like a corroded terminal in a multi plug on the wire harness too. seen this a lot recently, with a few brand name tractor electric systems and hard to find faults. The frightening thing is some of these tractors are less than 10 years old too!. Hard call to make but JD will try their hardest for you to keep it. If it burns your tractor they hope you visit them for replacement, with insurance check. Or if it blows up 2 days after warranty you go buy a new one from them!. This is the stunts our local crew would try pulling.