The high sensitivity beta-gamma spectrometer ELEGANTS V for rare β(e) and ββ(ee) decays