Easier way to show $\cos(20^\circ)\cos(30^\circ)\cos(40^\circ)=\cos^2(10^\circ)\cos(50^\circ)$
Using degrees as a unit, $$ \cos20^{\circ}\cos30^{\circ} = \frac{1}{2}\left(\cos50^{\circ}+\cos10^{\circ}\right)$$ and by multiplying both sides by $\cos40^{\circ}$: $$ \cos20^{\circ}\cos30^{\circ}\cos40^{\circ} = \frac{1}{4}\left(\cos90^{\circ}+\cos10^{\circ}+\cos50^{\circ}+\cos30^{\circ}\right). $$ while the same approach leads to: $$ \cos10^{\circ}\cos10^{\circ}\cos50^{\circ} = \frac{1}{4}\left(\cos70^{\circ}+2\cos50^{\circ}+\cos30^{\circ}\right)$$ so it is enough to prove that: $$ \cos70^{\circ}+\cos50^{\circ}=\cos10^{\circ} $$ that follows from $\cos60^{\circ}=\frac{1}{2}$.
Perhaps multiply both sides by $\sin\left(20^{\circ}\right)$, so that \begin{align*} \text{LHS}= & \sin\left(20^{\circ}\right)\cos(20^{\circ})\cos(30^{\circ})\cos(40^{\circ})\\ = & \frac{1}{2}\sin\left(40^{\circ}\right)\cos(30^{\circ})\cos(40^{\circ})\\ = & \frac{1}{4}\sin\left(80^{\circ}\right)\cos(30^{\circ})\\ = & \frac{\sqrt{3}}{8}\cos\left(10^{\circ}\right), \end{align*} and \begin{align*} \text{RHS} & =\left(\sin\left(20^{\circ}\right)\cos(10^{\circ})\cos(50^{\circ})\right)\cos(10^{\circ})\\ & =\frac{1}{2}\sin\left(20^{\circ}\right)\left(\cos(40^{\circ})+\frac{1}{2}\right)\cos(10^{\circ})\\ & =\left(\frac{1}{4}\left(\sin\left(60^{\circ}\right)-\sin(20^{\circ})\right)+\frac{1}{4}\sin\left(20^{\circ}\right)\right)\cos(10^{\circ})\\ & =\frac{\sqrt{3}}{8}\cos\left(10^{\circ}\right). \end{align*}