Consider the polynomial $$P(z):=z^6+z^5+z^4+z^3+z^2+z+1\,.$$ Let $t:=z+\dfrac{1}{z}$. Therefore, $P(z)=z^3\,Q(t)$, where
$$Q(t):=t^3+t^2-2t-1\,.$$
Let $\omega:=\exp(\text{i}\theta)$, where $\theta:=\dfrac{2\pi}{7}$. Then, $\omega$, $\omega^2$, $\omega^3$, $\omega^4$, $\omega^5$, and $\omega^6$ are all the roots of $P(z)$. That is, $t_1:=2\cos(\theta)$, $t_2:=2\cos(2\theta)$, and $t_3:=2\cos(3\theta)$ are all the roots of $Q(t)$. Note that, for an arbitrary $\phi$,
$$\text{csc}^2(\phi)=\frac{1}{1-\cos^2(\phi)}=\frac{4}{4-\big(2\cos(\phi)\big)^2}\,.$$
That is,
$$S:=\text{csc}^2(\theta)+\text{csc}^2(2\theta)+\text{csc}^2(4\theta)=\text{csc}^2(\theta)+\text{csc}^2(2\theta)+\text{csc}^2(3\theta)=\sum_{j=1}^3\,\frac{4}{4-t_j^2}\,.$$
Since $Q(t_j)=0$ for each $j$, we get that
$$t_j^3+t_j^2-2t_j-1=0\text{ or }(t_j^2-4)(t_j+1)+2t_j+3=0\,.$$
That is,
$$t_j+1=\frac{2t_j+3}{4-t_j^2}=\frac{2(t_j-2)+7}{4-t_j^2}=\frac{7}{4-t_j^2}-\frac{2}{t_j+2}\,.$$
Furthermore,
$$0=t_j^3+t_j^2-2t_j-1=(t_j+2)(t_j^2-t_j)-1\text{ or }\frac{1}{t_j+2}=t_j^2-t_j\,.$$
Hence,
$$\frac{4}{4-t_j^2}=\frac{4}{7}\,\left(2(t_j^2-t_j)+t_j+1\right)=\frac{4}{7}\,\left(2t_j^2-t_j+1\right)\,.$$
Finally,
$$S=\sum_{j=1}^3\,\frac{4}{4-t_j^2}=\frac{4}{7}\,\sum_{j=1}^3\,\left(2t_j^2-t_j+1\right)\,.$$
Since $\sum\limits_{j=1}^3\,t_j=-1$ and $\sum\limits_{j=1}^3\,t_j^2=(-1)^2-2(-2)=5$ by Vieta's Formulas, we end up with
$$S=\frac{4}{7}\,\big(2\cdot 5-(-1)+3\big)=8\,.$$