40/20 was a Plusnet package, using 80/20 with Plusnet limiting download speeds to 40 (the modem might still be connected at 79999k, Plusnet limit their copy of the IP profile).
The TP-Link Archer D5, and I think all the Archer DN models, are ADSL only, they do not support VDSL2, so couldn't replace the ECI modem. If you're going to keep using the ECI modem, you might as well get something which is just a wireless router (has no modem at all), which should be slightly cheaper, although high 11ac wireless speeds would probably make it still fairly expensive.
Also, is there any chance you're thinking about replacing the 582n because it's recently been given a remote firmware upgrade, and you're hitting the
DNS issues? If so, that should be fixed for everyone soon.