Let $T_1, T_2$ be regular trees of degrees $d_1, d_2 geq 3$. Let also $Gamma leq mathrm{Aut}(T_1) times mathrm{Aut}(T_2)$ be a group acting freely and transitively on $VT_1 times VT_2$. For $i=1$ and $2$, assume that the local action of $Gamma$ on $T_i$ is $2$-transitive; if moreover $d_i geq 7$, assume that the local action contains $mathrm{Alt}(d_i)$. We show that $Gamma$ is irreducible, unless $(d_1, d_2)$ belongs to an explicit small set of exceptional values. This yields an irreducibility criterion for $Gamma$ that can be checked purely in terms of its local action on a ball of radius~$1$ in $T_1$ and $T_2$. Under the same hypotheses, we show moreover that if $Gamma$ is irreducible, then it is hereditarily just-infinite, provided the local action on $T_i$ is not the affine group $mathbf F_5 rtimes mathbf F_5^*$. The proof of irreducibility relies, in several ways, on the Classification of the Finite Simple Groups.