Optimisation of the search for CP-symmetry violation at the deep underground neutrino experiment