This result has a long history.
Keith Dakin in his 1976 thesis defined the notion of simplicial $T$-complex as a simplicial set with in each dimension $n \geqslant 1$ a set $T_n$ of elements called thin such that
Degenerate elements are thin.
Every horn has a unique thin filler.
If all but possibly one face of a thin element are thin, then so also is the remaining face.
Such a $T$-complex is of rank $\leqslant n$ if all elements of dimension $>n$ are thin.
Keith showed that simplicial $T$-complexes of rank 1 are equivalent to groupoids, and those of rank 2 are equivalent to crossed modules (over groupoids). The story was completed by Nick Ashley in 1978 who showed that simplicial $T$-complexes are equivalent to crossed complexes. Full references are given on the nlab. The corresponding result for groupoids had an earlier airing in the paper:
Levi, F. W. Darstellung der Komposition in einer Gruppe als Relation. Arch. Math. (Basel) 8 (1957), 169–170.