On the Nielsen-Schreier Theorem in Homotopy Type Theory (Logical Methods in Computer Science, 2022)