Friction and work from torque

I would like to understand where is the error in the third case, for that I gave 2 easier cases where I'm able to find the energy from heating is equal to the energy lost by torque.

Case 1/ Purple disk is fixed to the ground. An arm is turning clockwise at $w1$. A grey disk is turning clocwise at $w1$. There is friction between grey disk and purple disk. This friction gives forces $F1$, $F2$ and $F3$ (I don't draw all forces). The energy from heating is $H=+FRtw1$ with $R$ the radius of purple disk and $t$ the time, and torques give the energy $+Frtw1-F(R+r)tw1$, the sum is 0. I noted $F$ the value of force from friction $|F| = |F1|$. $r$ is the radius of grey disk. Case 2/ The same case, but grey disk is turning at $w2<w1$, labo frame reference, $w1=10 rd/s$ and $w2=8rd/s$. The arm is turning clockwise at $10 rd/s$, but the grey disk is turning around itself counterclockwise at $2rd/s$ (arm reference). $|w2| < |w1|$. Energy from heating is $H=Ft((R+r)w1-rw2)$. Energy from torques is $+Frtw2-F(R+r)tw1$. The sum is 0. Case 3/ The same case, but I added a brown disk. The brown disk is like a gear (but it's not a gear), no sliding between grey disk and brown disk. No heating dissipation between brown disk and grey disk. The brown disk has the same radius than grey disk $r$. Forces between grey disk and brown disk can be like I want because it depends of the inertia, so I guess $|F4| = |F/3|$.

Energy from heating is $H$ it is like in the last case: $H=Ft((R+r)w1-rw2)$.

The energy from torques is $$Ft ( rw2-\frac{1}{3}rw2-\frac{4}{3}(R+r)w1+\frac{1}{3}(R+3r)w1-\frac{1}{3}rw3 ) = -FRtw1+\frac{2}{3}rw2-\frac{1}{3}rw3-\frac{1}{3}rw1$$.

The sum of H and work from torques is $Ft(2/3rw1-1/3rw2-1/3rw3)$ with $(w2+w3)/2=w1$, the sum is $0$. All is fine without sliding between the grey disk and the brown disk.

With sliding between the grey disk and the brown disk, the sum of energy is $kFrtw2-kFrtw3$ with $|F4| = k|F|$. With sliding, there is more heating so more energy. And $kFrtw2-kFrtw3$ increases too. There is a problem from a force or the method ?

For example, $w1=10 rd/s$, $w2=8 rd/s$, $w3=12 rd/s$. The grey disk is turning around itself at 2rd/s counterclockwise (arm reference) and the brown disk is turning around itself at 2 rd/s clockwise (arm reference). $|w2| < |w1| < |w3|$. There is a relation between $w2$ and $w3$ at start because there is no slinding between grey disk and brown disk. In the arm frame reference $w2 = -w3$ at start. I take $t$ very small because all rotationnal velocities will change.

Note: even I take $|F4| = k|F|$, the sum is not 0.