$(2019.)$ Edit: Rewriting the question to make it clear.
The progressive dice game
At the start, you have a fair, regular six sided dice $D=(1,2,3,4,5,6)$.
The game is played for $n$ turns. Each turn you make a roll, which will be $r\in D$.
Then to complete the turn, you make one of the following choices:
Bank the rolled number: You gain $r$ points (score).
Invest in (upgrade) the dice "evenly": If $r\lt 6$, choose $r$ sides and increase them by $1$ each. If $r\ge 6$, that is, $r=6k+k_0,k_0\lt 6$, then increase each of the six sides by $k$, and then choose $k_0$ sides and increase them by $1$ each.
Reroll the dice, effectively restarting this turn. But before rerolling, you must apply the penalty to the dice: "Evenly" downgrade the dice: If $S_0$ is the number of sides $\gt 0$ on the dice, then: If $r\lt S_0$, choose $r$ sides and decrease them by $1$ each. If $r\ge S_0$, that is, $r=S_0k+k_0,k_0\lt S_0$, then decrease each of the $S_0$ sides by $k$, and then choose $k_0$ sides and decrease them by $1$ each.
What is the optimal way to play to maximize your expected score at the end of the game?
If the dice was allowed to be upgraded/downgraded arbitrarily (not "evenly"), then one could downgrade the first five sides until they reach $0$. These sides now act as free rerolls. Then, keep investing the remaining points into the sixth side, which is now guaranteed to be rolled on each turn, after some amount of rerolls of that turn. Finally, bank that sixth rolled side in the last couple turns to maximize the expected value of the score.
But since we must upgrade/downgrade evenly, I'm not sure what is the optimal strategy.
If we ignore the "reroll" move:
If you upgrade the first $t$ turns, then bank the rest of the turns, you will expect the following amount of points on average: $$ f(t) = 3.5\times\left(\frac{7}{6}\right)^{t}\times(n-t)$$
Which boils down to, that if you want to maximize your expected score, you should upgrade until the last $6$ (or $7$) turns and then bank those turns.
But this approach completely ignores the third action; the rerolls.
Can we do better than this strategy, if we use the rerolls somehow?
Rerolls?
I haven't worked out the strategy if the rerolls are considered.
A reroll will on average decrease the average value of the dice, and allow you to either improve or worsen your current turn, with equal probability on average?
But there seem to be exceptions? For example, rerolling a $1$ seems useful if used early (as later, if we had upgraded a lot, all sides will be much greater than $1$). Simply downgrade the rolled $1$ side when downgrading (rerolling). If you roll that side again, it will be $0$, and this allows you to again reroll the dice for free (downgrading $0$ points is a free reroll). Which means, choosing to downgrade when you roll a $1$, can only increase your expected score in that turn. But there is still a (small?) drawback: Lets say some other side is a number $\ge 6$. Then when upgrading later, you will have to put back at least one of those upgrade points into that downgraded $0$ side.
Seems to me that rerolls will decrease the expected score on average (as they decrease the average value of the dice), so it is always better not to use them (except in that early scenario of the game, if $n$ is small)? Is this true?
For example, for small $n$, rerolls can be useful to force larger values. For $n=1$ specifically, it seems we can always force the first turn (the only turn) to end up banking a $6$, the maximal possible score for $n=1$, by rerolling and downgrading strategically the rest of the sides if $6$ was not rolled.
But for large $n$, the rerolls seem to lower the average expected score at the end, if used anytime in previous turns, as larger upgrades will need to replenish those downgraded points inevetably at some point, as they are carried out "evenly".