In this answer also the two-player nature of the game is adressed, which is given already when you assume that your opponent can track your actions -- as it is usually the case in a classroom.
Preliminary considerations and single-player game
Let us denote the probability for getting $k$ points when you target $n$ points by $p_n(k)$. It is given by [*]
$$p_n(k) = \left(\frac56\right)^n \delta_{kn} + \left(1-\left(\frac56\right)\right)^n \delta_{k0} $$
The expectation value when you target $n$ points is
$$E_n = \sum_k k \, p_n(k) \\= n \left(\frac56\right)^n$$
for which I obtain from Wolfram Alpha:
In a single player game, I would therefore expect to perform best by choosing the targets $n=5$ or $n=6$.
Two-player game
This is just a short explanation what one would do ... I've not done it for this game.
For reasons of simplicity, let us consider the following hypothetic version of your game. Before each "inner round", the players write down the targeted number on a sheet and hand it to the professor, who communicates each of these to the class. (Otherwise, it would be possible for players to change their initial decision according to the actions of the other players, which would make the whole thing more complicated.)
For solving the two-player case, let us first define the state $s$ in which the game can be by
$$s=(s_1, s_2, r)$$
where $s_i$ denoted the current "banked" or permanent points of player $i$ and $r$ the current round number. For each of those possible states, player one and two can target $k=1,2,\ldots$ points. For practical reasons, let us limit $k$ by 20, say.
Now the minimax theorem, the fundamental theorem for two-player zero-sum games, states that there exist an optimal mixed strategy which is denoted by $(p_1,\ldots,p_{20})$. It requests you to randomly choose one of the pure target point strategies $j$ with probability $p_j$.
Those strategies are obtained by solving a linear programming problem for a given payoff matrix $M_s$ in state $s$. Its entry $M_{s,k_1k_2}$ contains the probability for player 1 to win in state $s$ when he targets $k_1$ points and his opponent $k_2$ points. By solving the linear program, one further obtains the value $V_s$ of such a game state, which can be interpreted as the probability of winning the game in this state when both players follow the optimal strategy.
With this, one iterates over each state starting from the end of the game (after round 30) to the beginning. In round $r$, by knowing the winning probabilites for each state in round $r+1$ and by using the probabilities derived for the single-player version of the game, one can set up all corresponding payoff matrices in round $r$, and for each of them solve the linear program. By this, one finally arrives at round 1, the value of which is $\frac 12$ due to reasons of symmetry.
In summary, you gain the optimal mixed strategy for each of the possible states the game the be.
I'll stop here as I have no idea on your knowledge in game theory. If you have none, the former might be rather cryptic but nevertheless might give you a slight idea how to proceed. If you have some experience in game theory I can also add some mathematics.
[*] That might look a bit overkill here as the distribution is rather trivial in this case. However, a slight change of the game where you add the shown die points instead of 1 makes this more complicated approach neccessary.
EDIT: as an aside: I formerly solved a different version of the game, which is played by two players in rounds. They throw a single die on their own as often as they want and sum up the die points. At any time they can banke these points, but if a six is thrown all current points are lost and the other player has the turn. The player to have 50 or more points at the end of player two's turn wins the game.
For this setup, the non-simultaneous actions allows for a solution in pure strategies and also for a different solution technique, namely dynamic programming. On this page, you can find some excerpts of the optimal strategies I found (--in german language).