  The ESS$\nu$SB project proposes to base a neutrino ''Super Beam'' of
unprecedented luminosity at the European Spallation Source. The original
proposal identified the second peak of the oscillation probability as the
optimal to maximize the discovery potential to leptonic CP violation. However
this choice reduces the statistics at the detector and penalizes other
complementary searches such as the determination of the atmospheric oscillation
parameters, particularly the octant of $\theta_{23}$ as well as the neutrino
mass ordering. We explore how these shortcomings can be alleviated by the
combination of the beam data with the atmospheric neutrino sample that would
also be collected at the detector. We find that the combination not only
improves very significantly these drawbacks, but also enhances both the CP
violation discovery potential and the precision in the measurement of the CP
violating phase, for which the facility was originally optimized, by lifting
parametric degeneracies. We then reassess the optimization of the ESS$\nu$SB
setup when the atmospheric neutrino sample is considered, with an emphasis in
performing a measurement of the CP violating phase as precise as possible. We
find that for the presently preferred value of $\delta \sim -\pi/2$, shorter
baselines and longer running time in neutrino mode would be optimal. In these
conditions, a measurement better than $14^\circ$ would be achievable for any
value of the $\theta_{23}$ octant and the mass ordering. Conversely, if present
and next generation facilities were not able to discover CP violation, longer
baselines and more even splitting between neutrino and neutrino modes would be
preferable. These choices would allow a $5 \sigma$ discovery of CP violation
for around a $60\%$ of the possible values of $\delta$ and to determine its
value with a precision around $6^\circ$ if it is close to $0$ or $\pi$.
