Let $\mathsf{Top}$ denote the category of pointed spaces having the pointed homotopy type of a pointed CW-complex. Let $\mathsf{Grp}$ denote the category of groups. It is well documented that for groups $G$ and $H$ the fundamental group functor induces a bijection $$ \pi_1:\left[K(G,1),K(H,1)\right]_\mathsf{Top}\stackrel{\sim}{\to} \operatorname{Hom}_\mathsf{Grp}(G,H), $$ where on the left we have pointed homotopy classes of maps between Eilenberg Mac Lane spaces.
I am interested in the following generalisation. Let $\mathsf{Top}^\to$ denote the arrow category, whose objects are morphisms $X\to Y$ in $\mathsf{Top}$, and whose morphisms are commuting squares. The arrow category $\mathsf{Grp}^\to$ is defined similarly. There is a notion of homotopy in $\mathsf{Top}^\to$ in which a homotopy between morphisms from $p: X\to Y$ to $p':X'\to Y'$ is a commuting square $\require{AMScd}$ \begin{CD} X\wedge I_+ @> \tilde{H}>> X'\\ @V p\times\operatorname{Id} V V @VVp'V\\ Y\wedge I_+ @> H>> Y' \end{CD} Then the fundamental group gives a functor $\pi_1:\mathsf{Top}^\to\to \mathsf{Grp}^\to$ which respects homotopies.
Let $\mathsf{Fib}\subseteq \mathsf{Top}^\to$ denote the full subcategory whose objects are surjective fibrations with path-connected fibres. Let $\mathsf{Epi}\subseteq \mathsf{Grp}^\to$ denote the full subcategory whose objects are group epimorphisms.
Claim: Given $p:K(G,1)\to K(H,1)$ and $p':K(G',1)\to K(H',1)$ objects in $\mathsf{Fib}$, the fundamental group functor induces a bijection $$ \pi_1:\left[p,p'\right]_\mathsf{Fib}\stackrel{\sim}{\to} \operatorname{Hom}_\mathsf{Epi}(\pi_1(p),\pi_1(p')). $$
Question 1: Does this result appear in the literature? If so, where?
Question 2: Do I have the right theoretical framework? (It feels like in instance of something much more general.)