Questions in the comments
- You already discuss the resulting cohomology operation in the case that the action of $A$ on $D$ is trivial. For the general case, one first construts a natural transformation from $H^1(-;A)$ to local systems: $H^1(-;A)$ are isomorphism classes of $A$-principal bundles, and this natural transformation sends a principal bundle $P$ to $P\times_A D$. A cohomology class in $H^k(A;D)$ then gives a natural transformation from $H^1(-;A)$ to $H^k$ of this local system, by the same construction as in the trivial case.
- Yes, for a $(2,3)$-type $X$ the $2$-group $\Omega X$ is split, i.e. the action of $\pi_1(\Omega X)\cong \pi_2(X)$ on $\pi_2(\Omega X)\cong \pi_3(X)$ is trivial (this can be shown by the Eckmann-Hilton argument) and the $k$-invariant vanishes.
- For degree $2$ cohomology operations, there is in fact a complete classification (compare (Co)homology of the Eilenberg-MacLane spaces K(G,n) and the cited references): operations $H^2(-;A)\to H^4(-;B)$ are given by quadratic functions $q:A\to B$ (i.e. such that $q(x+y) - q(x) - q(y)$ is bilinear and $q(kx) = k^2q(x)$), and the resulting cohomology operation is given by a suitable version of the Pontryagin square. For $k\ge 3$, operations are in bijection with linear maps from $A\otimes \Z/2$ to $B$ (observe that such a linear map is also quadratic by the "freshman's dream"), and the resulting cohomology operation is the composition
$$ H^*(-;A)\to H^*(-;A\otimes Z/2)\xrightarrow{\Sq^2} H^{*+2}(-;A\otimes\Z/2)\to H^{*+2}(-;B) $$
The relation to Picard groupoids is a consequence of the Homotopy hypothesis, and given a braided Picard groupoid $C$, you can associate to it its abelian group $\pi_0 C$ of isomorphism classes and the (abelian!) group $\pi_1 C$ of automorphisms of the unit $1$, together with the map $q: \pi_0 C\to \pi_1 C$ which sends $x$ to the composition
$$ 1\cong x\otimes x^{-1}\xrightarrow{\beta_{x,x^{-1}}} x^{-1}\otimes x\cong 1 $$
It's a fun exercise to show that $q$ is quadratic in the above sense. It is not straightforward to give an inverse to this construction, i.e. construct the braided Picard groupoid from the quadratic map; for a reference in the symmetric setting, see Cegarra, A. M.; Khmaladze, E., Homotopy classification of graded Picard categories, Adv. Math. 213 (2007).
A chain level representative of $\Sq^2$ (and higher Steenrod squares) can be found in Ralph M. Kaufmann, Anibal M. Medina-Mardones. Cochain level May-Steenrod operations.