Both your choice principle, and its weakening to only give upper bounds, are equivalent to $\text{ATR}_0$ over $\text{RCA}_0$. I think your question provides a good illustration of hyperarithmetic theory and $\text{ATR}_0$.
The restriction of your principle to m∈{0,1} amounts to $Σ^1_1$ Separation and thus already equivalent to $\text{ATR}_0$ (Theorem V.5.1 in Simpson's SOSOA 2nd ed).
To see that the full principle is also provable in $\text{ATR}_0$, let $Z$ denote the parameters of $φ$ not shown. For each $Π^1_1(Z)$ statement, assign an ordinal by converting the statement to well-foundness of a $Z$-recursive order, and taking its ordinal, and using $∞$ for false statements. Let $α_{n,m}$ be the ordinal for $∀X \, φ(X,n,m)$, and $α_n=\min_m(α_{n,m})$, and $α=\sup(α_n)$. $α$ exists because we can concatenate $X$-recursive well-orderings exceeding $α_n$ (which we get uniformly), and get an upper bound on $α$. Finally, a desired $g$ exists in $L_{α+1}(Z)$ (and is hyperarithmetic in $Z$). This is because $L_{α+1}(Z)$ contains the set of all $Π^1_1(Z)$ statements whose ordinals are $≤α$, along with their assigned ordinals.
From the upper bound version to $\text{ATR}_0$
For the choice principle weakened to only give upper bounds, we first derive $\text{ACA}_0$ by using it (for every $Z$) to give bounds for true $Σ^0_1(Z)$ statements, and thus computing the Turing jump of $Z$. Next, let '$≺$' be a $Z$-recursive well-ordering. It suffices to show that, starting at $Z$, the Turing jump can be iterated along $≺$.
Let $φ(X,n,m)$ be "decode $n$ as $(a,e)$; if $X$ encodes an iteration of the Turing jump (starting at $Z$) for the restriction of $≺$ below $a$, and Turing machine $e$ with oracle $(Z,X)$ halts, then it halts in $≤m$ steps". Such an $m$ exists (i.e. $∀n ∃m ∀X \, φ(X,n,m)$) because otherwise we would get conflicting arithmetic transfinite recursions for an initial segment of $≺$, which we can then compare (in $\text{ACA}_0$) to get an infinite $≺$-descending sequence.
Let $g$ be as in the principle. Then the iterated Turing jump is computable from $Z,g$ by converting transfinite recursion into bounded recursion using $g$. (By weak Kőnig's lemma, a failure of the bounded recursion to terminate would give an infinite $≺$-descending path.) Next, if there are no inconsistencies below $a$, then the Turing jump can be iterated from $Z$ along $≺$ up to $a$ (uniquely, per above), and thus no inconsistencies at $a$ either. Thus, each inconsistency gives a $≺$-lower inconsistency, and since an inconsistency is an arithmetic property, an infinite $≺$-descending sequence.