Hi, for the transmission you need to plug in a dedcated LR tester to read the codes stored in the transmission ECU this will point you in the right direction, otherwise it's a guessing game, as about the other issue bad contacts in the trailer socket are quite common, start by checking the pins in the connectors to not be corroded or loosened, give some electric contact spray in them.
My friends call me Fery
2000 Discovery Td5 ES manual
Hawkeye v.6, Nanocom EVO,
VDM UCANDAS, oscilloscope
if you think my english is peculiar it means you didnt hear my japanese
ALL MY ADVICES ARE BASED ON MY OWN KNOWLEDGE AND MY WAY OF UNDERSTANDING THE DESCRIPTION AND OPERATION OF SYSTEMS... I'M NOT A LAND ROVER TRAINED SPECIALIST JUST AN ADDICTED ENTHUSIAST.