Here is a possible line of approach, lacking only the insight why
$(d+1)\frac{n}{b^d-1}$ must be $1$.
If the base $b$ representation of a number $n$ is cyclic of (exact) length $d\geq\lceil{\log_b n}\rceil$ (with inequality for leading zeros),
then the first $d$ consecutive multiples of $n$, $\{kn|1\leq k\leq d\}$,
exhaust (i.e. are in bijection with) all the cycles, which in turn
correspond bijectively with the repeating base-$b$ expansions of
$\frac{kn}{b^d-1}\in(0,1)$.
Their sum satisfies
$$
\frac{b^d-1}{b-1}s=
\frac{d(d+1)}{2}n
\qquad\text{where}\qquad
s=d\frac{b-1}{2}\frac{(d+1)n}{b^d-1}\in\mathbb{N}
$$
is the sum of the base-$b$ digits of $n$.
Since each digit is between $0$ and $b-1$,
$s$ must lie between $0$ and $d(b-1)$ inclusive.
However, for the sum $s$, the range must be exclusive (for $b>2$),
since otherwise the digits would all be the same ($0$ or $b-1$)
and $d$ would have to be $1$. Thus we have
$$0<\frac{s}{d}=\frac{b-1}{2}\frac{(d+1)n}{b^d-1}<b-1$$
$$0<0.\overline{n_{d-1}\dots n_0}=\frac{(d+1)n}{b^d-1}<2$$
where the middle quantities in the first and second lines are
the average value $\frac{1}{d}\sum a_i$ of the base-$b$ digits of $n$,
and the fraction obtained from repeating the digits of
$n=\sum_0^{d-1}a_ib^i$ after the base-$b$ decimal point,
respectively. These quantities are rational numbers, but
not guaranteed to be integers. What we want to show however, as we shall see,
is that the latter quantity is in fact an integer, and therefore $1$.
Let's assume that $d>1$, and that $d$ is minimal, in the
sense that the $n$ is not a repeated or decomposable cycle:
$$
\nexists c\vert\;d,
\quad 1<c<d
\quad(c\;\text{a proper divisor of}\;d)
\quad\text{with}
\quad\frac{b^{d}-1}{b^c-1}\vert\;n.
$$
We should also note that $s\equiv n\pmod{b-1}$,
i.e. that $\frac{n-s}{b-1}\in\mathbb{Z}$,
since each base-$b$ digit of $n$ remains fixed modulo $b-1$
when multiplied by its respective nonnegative power of $b$.
We actually want to show that
$$n=\frac{b^d-1}{d+1}
\qquad\text{and that}\qquad
t=\frac{b^d-1}{n}=d+1\in\mathbb{N}$$
is in fact prime with $b$ as primitive root.
Perhaps there is a good argument why $s=d\frac{b-1}{2}$ lies exactly in the middle (the expected value) of the prescribed range or, equivalently,
that the average value of the digits of $n$ base $b$ is $\frac{b-1}{2}$, or
that the first noncyclic multiple of $n$ (which we know is the $d+1^\text{th}$) satisfies $(d+1)n=b^d-1$ (which is $b-1$ times the repunit of length $d$).
Certainly we know that the sequence $\{kn\}_{k=1}^d$ is increasing and bounded by $b^d$ (since each term has at most $d$ digits base $b$). Therefore, they must correspond with the lexicographic ordering of cyclically shifted length-$d$ strings starting with $n$, zero-padded if necessary (i.e. if $b^{d-1}>n$). And since $(d+1)n=dn+n$ is the sum of the smallest and largest of these cyclic shifts, its leading digit must also be the sum of the smallest and largest digits of $n$ (unless a carry increases the sum to $\geq b^d$).
If we need to resort to an examination in more detail of the products $\{kn\}_{k=1}^d$ and their relation to base-$b$ shifts of $n$, we need not resort to naming $n$'s digits. We can in stead rely on the division algorithm, and note that if
$$
n=q_k b^k+r_k
\quad\text{with}\quad
\left\{\begin{matrix}
q_k=\lfloor{b^{-k}n}\rfloor,\\
r_k=n-b^kq_k
\end{matrix}\right.
\quad\text{for}\quad
0\leq k\leq d
\quad\text{and if}\quad
n_k=r_k b^{d-k}+q_k,
$$
then $\{n_k\}_{k=1}^{d-1}$
is a permutation of $\{nk\}_{k=1}^{d-1}$.
Note that if $n$ and $n_k$ are identified with
strings of $d$ letters in the alphabet $\{0,\dots,b-1\}$,
then $n_k=\text{right}(n,k)+\text{left}(n,d-k)$,
where the plus symbol here indicates string concatenation and the
right and left functions are familiar from some programming languages,
since $q_k$ and $r_k$ are the left $d-k$ and
right $k$ digits of $n$ base $b$ respectively.
Once we can establish that $n=\frac{b^d-1}{d+1}$,
we would have that $b^d\equiv 1\pmod t$.
From here we could argue that $b$ must have order $d$ modulo $t$
using the minimality of $d$: if $1<c=\text{ord}_t(b)<d$,
then we would have a nontrivial repunit factorization
$$
\frac{b^c-1}{t}\cdot\frac{b^d-1}{b^c-1}=n
$$
so that $n$ is a repetition of a shorter cycle of length $c$,
contradicting our assumption.
But this would prove the result, since then
$t-1=d=\text{ord}_t(b)\leq\phi(t)\leq t-1$,
i.e. we would have sandwiched Euler's totient function
$\phi(t)$ into attaining its theoretical maximum,
which only occurs when $t$ is prime, while on the other hand,
the order of any element $b$ mod $t$ only attains $\phi(t)$
when the element $b$ is a primitive root,
i.e. a generator of $(\mathbb{Z}/t\mathbb{Z})^*$.
Finally (just for fun), note that a start at factoring $n$ for $d>1$ is
$$
n=\frac{b^d-1}{t}=\frac{1}{t}\prod_{0<c|d}\Phi_c(b)
$$
where $\Phi_c(x)$ denotes the cyclotomic polynomial of degree $c$,
and the product above will be a partial factorization with $\tau(d)$ terms,
one of which must be divisible by the prime $t$,
where $\tau(d)$ is the number of positive divisors of $d$.
Your observation is true, and a somewhat stronger result is true: you will almost always be able to find a smaller prime which divides the chosen prime and leaves a remainder of either $4$ or $6$. In the rare instances where a remainder of either $4$ or $6$ cannot be found (such as for $31$), there can be found a remainder of $12$, which is a multiple of both $4$ and $6$.
Consider the set of positive integers greater than $1$ having no factor of $2$ or $3$. They are represented as having the form $6k\pm 1$ for $k\ge 1$. Note that the smallest member of this set is the prime number $5$, and all prime numbers other than $2,3$ are included in this set. Note further that this set is closed under multiplication: the product of any two members of the set is another member of the set (i.e. a nmumber lacking any factor of $2$ or $3$), and if a member of the set has factors, its factors are members of the set also (i.e. numbers lacking any factor of $2$ or $3$).
Case A: If you have a prime number of the form $p_k=6k-1 \ge 11$, you can subtract $4$ from it to get a smaller number $6m+1$ where $m=k-1$. Either $6m+1$ is a prime, or it has prime factors. If $6m+1=p_m$ is prime, then $p_k=p_m+4$, and dividing $p_k$ by $p_m$ leaves a remainder of $4$. If $6m+1$ is not prime, then it has at least one smaller prime factor: $6m+1=n\cdot p_m$ and $p_k=n\cdot p_m+4$. But $p_m \ge 5>4$, so here again dividing $p_k$ by $p_m$ leaves a remainder of $4$.
Case B: If you have a prime number of the form $p_k=6k+1 \ge 13$, you will almost always be able to subtract $6$ from it to get a smaller number $6m+1$ where $m=k-1$. Either $6m+1$ is a prime, or it has prime factors. If $6m+1=p_m$ is prime, then $p_m \ge 7$ and $p_k=p_m+6$. Thus dividing $p_k$ by $p_m$ leaves a remainder of $6$. If $6m+1$ is not prime, then it has at least one prime factor: $6m+1=np_m$ and $p_k=np_m+6$. If $p_m \ge 7>6$, then dividing $p_k$ by $p_m$ always leaves a remainder of $6$.
Case C: The rare case for $p_k=6k+1 \ge 13$ (as in Case B), but $6m+1$ only contains factors of $5$, such that $6m+1=5^r$ and $p_k=5^r+6$. Here, dividing $p_k$ by $5$ leaves a remainder of $1$. First, note that a number of the form $6m+1=5^r$ can only be an even power of $5$ if $r$ is even, not odd, i.e. $6m+1=5^{2s}=25^s$. This means $p_k=25^s+6$ which implies that $p_k-12=25^s-6=6n+1$. Either $6n+1$ is a prime, or it has prime factors. If we divide $p_k$ by $6n+1$ if it is a prime, or by any of its prime factors if it is not prime, there will be a remainder of $12$, provided that neither $6n+1$ nor all of its prime factors are smaller than $12$. We know that $6n+1$ has no factors of $2$ or $3$, and we can see immediately that $6n+1=25^s-6$ is not evenly divisible by $5$. I will prove that $25^s-6$ is not evenly divisible by $7$ or $11$, which means that any prime factor of $6n+1$ is larger than $12$, so dividing $p_k=(6n+1)+12$ by any of those prime factors will in fact leave a remainder of $12$.
Proof that $25^s-6$ is not evenly divisible by $7$ or $11$: By modular arithmetic, $25^s-6 \equiv 4^s+1 \bmod 7$. As $s$ increases from $1$, the values of $4^s+1 \bmod 7$ cycle: $5,3,2,5,3,2,\dots$. Since division of $25^s-6$ by $7$ always leaves a non-zero remainder, it is never divisible by $7$, and hence has no factors of $7$. Similarly, $25^s-6 \equiv 3^s+5 \bmod 11$. As $s$ increases from $1$, the values of $3^s+5 \bmod 7$ cycle: $8,3,10,9,6,8,3,10,9,6,\dots$. Since division of $25^s-6$ by $11$ always leaves a non-zero remainder, it is never divisible by $11$, and hence has no factors of $11$.
In summary, primes $p_k>11$ of the form $6k-1$ will always admit of a smaller prime that divides $p_k$ leaving a remainder of $4$. Primes $p_k>11$ of the form $6k+1$ will almost always admit of a smaller prime that divides $p_k$ leaving a remainder of $6$, and in the rare cases where that is not true, primes $p_k>11$ of the form $6k+1$ will then admit of a smaller prime that divides $p_k$ leaving a remainder of $12$, which is a multiple of both $4$ and $6$.
Best Answer
This works because $7$ is a factor of $10^{(7-1)}-1=10^6-1=999999$. We have that the period of the decimal expansion of $7$ will be a factor of $6$.
If we look at $999999=3^3\cdot 7\cdot 11 \cdot 13\cdot 37$ we find that
$3$ and $9$ are factors of $10^1-1=9$ and have period $1$
$11$ is a factor of $10^2-1=99$ and has period $2$ ($9$ we already know has period $1$)
$27$ and $37$ are factors of $10^3-1=999$ and have period $3$
$7$ and $13$ are factors of $10^6-1=999999$ not already considered, and have period $6$
First note that for any number there are only a finite number of possible remainders. If we exclude prime factors of $2$ and $5$ (these shift the decimal point rather than affecting the ultimate periodicity), a number $n$ will never divide $10^r$ without remainder. If you work through the calculation you will see that as soon as a remainder repeats, the calculation repeats and the decimal repeats.
Suppose you divide through and have a repeated remainder: $10^a=ns+r, 10^b=nt+r, b\gt a$, then subtracting these gives $10^b-10^a=n(t-s)=10^a\left(10^{b-a}-1\right)$ and $n$ is a factor of $10^{b-a}-1$. So the decimal repeats after $m$ digits precisely when $n$ is a factor of $10^m-1$ (it has no factors in common with $10^a$). If $m$ is the smallest positive integer for which this happens this is the shortest period over which the decimal (and the remainder) repeats.
Since we have completely factored $10^6-1$ we have identified all the possible numbers with period dividing $6$, including periods $1$, $2$ and $3$. The only other numbers which repeat with a period less than $6$ are found by factoring
$9999=9\times 11\times 101$ which gives $101$ and factors which contain it period $4$
$99999=9\times 41 \times 271$ with $41$ and $271$ and factors which contain them having period $5$
Other integers have longer periods and will therefore have no repetition of remainders in the first six.
There are plenty of interesting facts to explore, including precisely what does happen for $\frac 1n$ when $n$ has factors $2$ and/or $5$ and what happens in bases other than the arbitrary base $10$.
I am hoping that the examples here will prompt you to check that the periods are as advertised, and to explore a bit more what is going on.