Ok. A little update on this issue. After it failed spectacularly when hot the other weekend, I drove it all the follow week completely fault free.
However, as I've been preparing the car for sale later this month, I decided to remove some of the accessories I'd fitted. One of additions was my Sony HU, and a Qi charger shelf. However after reasonably of the centre console, I moved the car to improve access to the front bumper and I got the F4 flash on the dash. Before I parked the car, there was no F4, so I assume it's something I've done.
So I decided to remove the centre console again, and check the plugs by the gear selector. The connections at the sensor board appear to have had some moisture in them at some point. This corrosion has removed the tin plating on the socket pins. So I decided to remove the socket from the circuit board, so I could swap the pins about. Oddly the socket is a 12 way type, but only 5 of the pins are actually used. This made is pretty easy to remove the socket, pull all the pins, then fit corrosion free pins to the locations that actually have wires in them.
After soldering the socket back in, I sat and thought about what this board actually does. I can't imagine it does a great deal. Presumably it is senses the gear selector position, but I don't know to what degree of accuracy. There are some components which I've been unable to identify, but I assume they're hall sensors, as there are magnets on the selector. The position of them appears to be a bit random, so I don't know what these are actually for. There are insufficient wires for each individual sensor to send a signal to TCM, but looking at the ICs on the board, one is a duel NAND gate and the other is a D type Flip Flop. So I'm thinking that this circuit simply tells the TCM that the gear lever is in the sport position. I'm going to research this in more detail today.
I've yet to finish putting the gear selector and centre console back together, but hopefully I'll do that tonight. Then I'll see if all the messing with the socket pins was actually worthwhile.