Thanks for all the advice - this is feedback for the community on what I found out.
Since my master socket is in a place where I can't easily put a PC, and where I don't really want to run all my ethernet cables to, I decided to go wireless, which would enable me to test from the master socket. I was passing a shop, so I went in and bought a Belkin wireless router. Set it up in place of the old D-link 504, to get the set-up right before taking it to the master socket. I had immense difficulty with the router (see below) and it went back to the shop, but the line drops stopped - even before I'd got to the master socket. My guess is, having done further research, that I was picking up AM radio interference at night and the quite old D-Link wasn't up to it -( no disrespect to D-Link it was built when broadband was 512kb).
Further research suggested the Solwise 600E was good at remaining stable in the face of interference - this is a 1 port router - so I now have one plugged into the master socket, with the phone extension now replaced by an ethernet cable, and an Engenius WAP and Gigabit switch where the old Dlink was. All sorted, no line drops at all.
My experience with the Belkin router, by the way, in case other people spend hours wondering what's happening - if I enabled the DMZ, all traffic went there, even responses to requests from other machines which NAT should have returned to them, ie, they effectively lost connection. It also cached DNS, but then served the IPs back in reverse order, ie, relay.plus.net became 107.8.159.212, effectively meaning no DNS.
Chris