Here is a link where you can find a wiring diagram.
https://pandpsmallengines.com/pages/...det-xt1-wiring
Looking at it you can see that the PTO switch has two contacts, one opens, the other closes when you operate the PTO lever.
The trouble is that either path from the contacts of the PTO switch pass through the seat safety switch and the brake switch, so a problem could exist almost anywhere.
The fact that the engine dies when it's supposed to only proves that some of the paths through all three switches are working, it doesn't prove every path.
Since your description indicates that it is intermittent I would assume that the switches themselves are good and concentrate on the connectors plugging onto the switches,
checking for tightness and corrosion.