Conditional extremum
Let us maximize the function
$$f(\vec x) = \sum\limits_{i=1}^k(x_i^3-2x_i)$$
on the condition
$$c(\vec x) = \sum\limits_{i=1}^k (x_i-2x_i^2) = 0$$
for the given $k$ and positive $x_1, x_2\dots x_k.$
Note that solutions on the edges of the area reduces $k$ and therefore are unacceptable.
Also, the solution in the form
$$x_j = t,\quad j=1\dots k,$$
gives
$$t-2t^2=0\rightarrow\ t={1\over2}\rightarrow f(\vec x) = - {7\over8}k < 0$$
and isn't valid.
A conditional maximum within a region can be found by the method of Lagrange multipliers and corresponds to one of the stationary points of the function
$$f(\vec x,\lambda) = \sum\limits_{i=1}^k(x_i^3-2x_i)+\lambda\sum\limits_{i=1}^k (x_i-2x_i^2).$$
That gives the system
$$f'_\lambda =0,\quad f'_{x_j}=0,\quad j=1\dots k,$$
or
$$\sum\limits_{i=1}^k (x_i-2x_i^2)=0,\quad 3x_j^2-2 + \lambda(1-4x_j) = 0,\quad j=1\dots k,$$
$$3x_j^2-4\lambda x_j + \lambda -2 = 0,\quad j=1\dots k.$$
Values Relationship
Let $x_j \in \{u, v\},\ 0<u<v,$ then
$$u+v = {4\over3}\lambda,\quad uv = {\lambda-2\over3},$$
$$u+v = {4\over3}(3uv+2),\quad\rightarrow 12uv-3v = 3u-8,$$
$$v = {3u-8\over3(4u-1)},\quad u\in\left(0,{1\over4}\right),\quad v\in\left({8\over3}, \infty\right),$$
and substitution $t= 1-4u$ gives
$$u={1-t\over4},\quad v = {29\over12t}+{1\over4},\quad t\in(0,1)$$
Let WLOG
$$x_j =
\begin{cases}
\dfrac{1-t}{4},\quad j=1\dots b\\[4pt]
\dfrac{29}{12t}+\dfrac14,\quad j=b+1\dots k.
\end{cases}\tag1$$
Solution for real parameters
Using $(1),$ one can calculate
$$8\sum\limits_{i=1}^k (x_i-2x_i^2) = b\left(2(1-t) - (1-t)^2\right) + (k-b)\left(2\left({29\over3t} + 1\right) - \left({29\over3t} + 1\right)^2\right) = -(k-b){841\over9t^2} + k-bt^2 = k(1-t^2) + (k-b)\left(t^2-{841\over9t^2}\right)> 0$$
(see also Wolfram Alfa),
$$64\sum\limits_{i=1}^k (x_i^3-2x_i) = b((1-t)^3 - 32(1-t)) + (k-b)\left(\left({29\over3t}+1\right)^3 - 32\left({29\over3t}+1\right)\right)$$
$$ = k((1-t)^3 - 32(1-t)) + (k-b)\left(\left({29\over3t}+1\right)^3 - (1-t)^3 - 32\left({29\over3t}+1\right)+32(1-t)\right)$$
$$ = k(1-t)(-31-2t+t^2) + (k-b)\left({29\over3t}+t\right)
\left(\left({29\over3t}+1\right)^2 + \left({29\over3t}+1\right)(1-t) + (1-t)^2 - 32\right) > 0,$$
and that leads to the system of $t$ and $b$ in the form of
$$\begin{cases}
9kt^2(1-t^2) - (k-b)(841-9t^4) > 0\\
27kt^3(1-t)(-31-2t+t^2) + (k-b)(29+3t^2)(841 + 261t - 348t^2 - 27t^3 + 9t^4) > 0\\
t\in(0,1),\quad b\in[1,k-1]
\end{cases}\tag2$$
(see also Wolfram Alfa).
Summation of $(2.1)$ factor $\ 3t(31+2t-t^2)>0\ $ and $(2.2)$ factor $\ 1+t>0\ $ leads to the inequality for $t:$
$$(841-9t^4)3t(31+2t-t^2) - (t+1)(29+3t^2)(841+261t-348t^2-27t^3+9t^4) < 0,$$
or
$$(3t+29)(3t^2+29)(3t^2+58t-29)<0$$
(see also Wolfram Alfa),
with the solution
$$t\in(0, t_m],\quad t_m = {1\over3}(4\sqrt{58} - 29)\approx0.487697,$$
wherein $t_m$ corresponds to the equal sign of the inequalities in $(2.1)-(2.2).$
The system $(2)$ on the condition $t=t_m$ can be presented in the form of
$$\begin{cases}
1.63149k - 840.491(k-b) > 0\\
-50.923k + 26233.9(k-b) > 0\\
b\in[1,k-1],
\end{cases}$$
$$k \approx 515,2 (k-b).$$
Solution for real $k$ and $b$ shows that the least integer allowable values are $$\mathbf{k=516,\quad b=515}.$$
One solution for known parameters
Earlier it was proved that solutions for $k<516$ are impossible. To find one solution in the case of known integer values $k = 516$ and $b = 515,$ one can use the relations $(1)$ in the form of
$$x_j =
\begin{cases}
\dfrac{1-t_m}{4},\quad j=1\dots 515\\[4pt]
\dfrac{29}{12t_m}+\dfrac14,\quad j=516\dots k,
\end{cases}$$
or
$$x_j =
\begin{cases}
\dfrac{8-\sqrt{58}}{3}\approx0.12807563,\quad j=1\dots 515\\[4pt]
\dfrac{8+\sqrt{58}}{3}\approx5.20525770,\quad j=516,
\end{cases}$$
but this set doesn't satisfy the first inequality.
Substitution of
$$u_m = \dfrac{8-\sqrt{58}}{3},$$
to the first inequality
$$515(u_m^3-2u_m) + v^3-2v > 0$$
gives $v>5.20792$,
and the values $u=u_m,\ v= 5.208\ $ give the solution.
The set of solutions for known parameters
In order to find the full range of possible solutions in the case of known integer values $k = 516$ and $b = 515,$ one should abandon the relations $(1)$ and look for a solution in the form of
$$x_j =
\begin{cases}
u,\quad j=1\dots b\\[4pt]
v,\quad j=b+1\dots k.
\end{cases}$$
Then the allowable area of $t$ can be obtained from the system
$$\begin{cases}
f(\vec x) = 515(u^3-2u) + v^3-2v > 0\\
c(\vec x) = 515(u-2u^2) + v-2v^2 >0 > 0.
\end{cases}$$
The bounds of the area can be found from the system of according equations:
$$\left[\begin{align}
&\begin{cases}
515(u^3-2u) + v^3-2v > 0\\
515(u-2u^2) + v-2v^2 = 0
\end{cases}\\
&\begin{cases}
515(u^3-2u) + v^3-2v = 0\\
515(u-2u^2) + v-2v^2 > 0
\end{cases}
\end{align}\right.$$
The analysis of solutions for the first and the second cases shows that
$$\begin{cases}
u\in(0.121883, 0.1344),\\
v\in\left(\dfrac{\sqrt[3]{-13905 u^3 + \sqrt{(27810 u - 13905 u^3)^2 - 864} + 27810 u}}{3 \sqrt[3]2}\\
+ \dfrac{2\sqrt[3]2}{\sqrt[3]{-13905 u^3 + \sqrt{(27810 u - 13905 u^3)^2 - 864} + 27810 u}},\\
\dfrac{\sqrt{-8240u^2 + 4120u + 1} + 1}{4}\right)
\end{cases}$$
That gives:
for $u=0.125\quad 5.16867<v<5.16967$ (see also Wolfram Alfa),
for $u=0.122709\quad 5.13899<v<5.13932$ (see also Wolfram Alfa), etc.
Conclusion
The analysis shows that
$$\boxed{k=516}$$
is the required minimum of value $k.$
Done!