Design of a β-detector for TITAN-EC and the first electron-capture branching ratio measurement in a Penning trap