The theory for right to left modulus exponential technique is very straight forward if the explanation is using a small modulus n number. For example,
$$3^{77} \bmod 11$$
In this example, we know that the remainder will be always less than 11 which the maximum remainder in this case will be 10. Hence, when we are implementing the square across right-to-left binary bits, the biggest square operation will be 10 and followed by modulus 11 & so-on
However, if we are applying this in the RSA formula. For example,
$$S^e \bmod n$$
where $n$ is the product of $p \times q$ and it can be up to 4000 over bits. Regardless of the value of $e$, using the right-to-left technique, the sub-step anyhow will involve the square of the remainder. In this case, does it mean worst case we will have 4000 bits x 4000 bits, and it will yield 8000 bits result & followed by the modulus $n$ operation. (This doesn't sound make sense to me, of course, there is also a high chance I don't 100% understand this technique)
I apologize if the question sounds silly to you. But I like to get more idea of how to practically apply this technique into the real world RSA implementation. The right-to-left technique looks like only help in the big exponential side, but there is still a big modulus number portion to be resolved which I still couldn't make sense where the most internal source is more focusing on the exponential side.
Appreciate it if you can enlighten me.