Let's first examine the proof in detail, before turning to the key idea that makes it work (which you seem to be striving towards in your nice observation).
Note $\rm\ mod\,\ 7\!:\ 10^6\equiv 1\ \Rightarrow\ 10^{\,\large n}\!\color{#c00}\equiv 10^{\Large{\, (n\ mod\ 6)}}\ $ by little Fermat (see comments for proof).
Here $\rm\ mod\,\ 6\!:\ 10\equiv 4,\,\ 4^2\equiv 4,\,$ so $\,\color{#0a0}{10^{10}\equiv 4^{10}\equiv 4}$
Thus $\rm\ mod\ 7\!:\ 10^{\Large{10^{10}}\!\!}\color{#c00}\equiv 10^{\,\large{\color{#0a0}{(10^{10}\, mod\ 6)}}}\equiv 10^{\,\color{#0a0}4}\equiv 3^4 \equiv 2^2\equiv 4$
Your observation is very close to the key idea: the reason that the proof works is the following. If $\rm\,k\equiv 1\pmod 3\,$ and $\rm\,k\equiv 0\pmod 2\,$ then $\rm\,k^n \equiv k\,$ holds both mod $3$ and mod $2$ so also mod $6$, hence we deduce $10^{\,k^n}\!\equiv 10^k\pmod 7$. In essence we have lifted up the "easy power property" $x^2 = x\,\Rightarrow\, x^n = x\,$ from the universal easily powerable elements $\,1,0\,$ to a pair of them $\rm\,4 \equiv (1,0)\ (mod\ 3,2)\ $ also, a solution, since $\rm (1,0)^2 \equiv (1,0).$
Generally solutions of $\,x^2 = x\,$ are called idempotents. They play fundamental roles in factorization of rings and their elements - something that will become much clear if one goes on to study the Chinese Remainder Theorem in an abstract algebra course.