The long-range electronic modulations recently discovered in the geometrically frustrated kagome lattice have opened new avenues to explore the effect of correlations in materials with topological electron flat bands. Charge density waves (CDW), magnetism and superconducting phases are thought to be - depending on the electron number - the result of either the flat bands, the multiple Dirac crossings or the van Hove singularities close to the Fermi level. Nevertheless, the observation of the lattice response to the emergent new phases of matter, a soft phonon mode, has remained elusive and the microscopic origin of CDWs is still unknown. Here, we show, for the first time, a complete melting of the ScV$_6$Sn$_6$ (166) kagome lattice. The low energy longitudinal phonon with propagation vector $\frac{1}{3} \frac{1}{3} \frac{1}{2}$ collapses at 98 K, without the emergence of long-range charge order, which, remarkably, sets in with a propagation vector $\frac{1}{3} \frac{1}{3} \frac{1}{3}$. The CDW is driven (but locks at a different vector) by the softening of an overdamped phonon flat plane at k$_z$=$\pi$, characterized by an out-of-plane vibration of the trigonal Sn atoms. We observe broad phonon anomalies in momentum space, pointing to \hhy{(1)} the existence of approximately flat phonon bands which gain some dispersion due to electron renormalization, and \hhy{(2)} the effects of the momentum-dependent electron-phonon interaction in the CDW formation. \textit{Ab initio} and analytical calculations corroborate the experimental finding to indicate that the weak leading order phonon instability is located at the wave vector $\frac{1}{3} \frac{1}{3} \frac{1}{2}$ of a rather flat collapsed mode. In particular, we analytically calculate the phonon frequency renormalization from high temperatures to the soft mode, and relate it to a peak in the orbital-resolved susceptibility of the trigonal Sn atoms, obtaining excellent match with both ab initio and experimental results, and explaining the origin of the approximately flat phonon dispersion. Our data report the first example of the collapse of a kagome bosonic mode (softening of a flat phonon plane) and promote the 166 compounds of the kagome family as primary candidates to explore correlated flat phonon-topological flat electron physics.