I want to preface this by saying that this isn't homework, it's just a question I've made up myself (so it could just be impossible to solve), and I am a beginner so apologies if I miss something obvious.
I'm asking this question to confirm whether my reasoning is correct, and if it isn't where I went wrong / what I missed.
Let's say I have a very large gear (specifically a pinion) on a rack (which cannot move at all, only the gear may move up and down the rack, and it is free to do so for any distance (for all intents and purposes the rack is infinately long)) with $n$ teeth, a radius $r$ (which extends from the centre of the gear to the tip of the teeth), a static friction constant $\mu_s$ with the rack it is touching, a depth/length $\ell$, a mass $m$ and $\tau_{\text{applied}}$ is the torque I apply to the centre of the gear to turn it. It is some positive number. In what range must that torque be to turn the gear? I.e.: $\tau_{\text{min}} < \tau_{\text{applied}} < \tau_{\text{max}}$. Below $\tau_{\text{min}}$ the wheel would just not be able to tilt over the rack and start moving, and above $\tau_{\text{max}}$ the gear will start slipping and be considered to not work at optimal efficiency.
To calculate $\tau_{\text{max}}$ I get the force exerted on the tip of the wheel by doing $\frac{\tau_{\text{applied}}}{r}=F$. There will be friction $F_{f\text{, max}}$ opposing this and it is equal to $F_{f\text{, max}} = \mu_s N$, and since the downwards force on the gear is $-mg$, the normal must be $N=mg$ as $\sum{F_y}=0$, so $F_{f\text{, max}} = -\mu_s mg$ (negative as it is acting in the opposite direction to $F$. This means that in order for $\sum{F_x}=0$, $F$ must be at maximum $\mu_s mg$ at all times, hence $\tau_{\text{max}}=\mu_s mg \cdot r$.
To calculate $\tau_{\text{min}}$, I reason that to be able to turn and go past the turning point enough such that the centre of mass surpasses it and it begins to topple, the force acting upwards on that point must be greater than $mg$, so the torque at the turning point must be $\tau_{\text{min}}=mg \cdot d$, where $d$ is the distance from the turning point to the centre of the gear tooth. Since each gear tooth is equidistant, the width $w$ of each tooth must be $w=\frac{2 \pi r}{n}$. This means that $d=\frac{w}{2}$, or $d=\frac{\pi r}{n}$. So the minimum torque required to start to turn the gear would be $\tau_{\text{min}}=\frac{mgr}{n} \pi$.
Therefore the torque $\frac{\pi}{n} \cdot mgr < \tau_{\text{applied}} < \mu_s \cdot mgr$
This would also mean that when $\frac{\pi}{n} \ge \mu_s$ there would be no possible $\tau_{\text{applied}}$ to have turning without slipping.
Is this correct? If not, where have I gone wrong / what have I missed?