This is basically the plot of early Soviet hard sci-fi novel "Победители недр" (1937) [0] by Grigory Adamov. A few intrepid scientists go build a thermal power station deep below the surface in a specially designed subterranean vessel, and somehow a young pioneer sneaks on board with them, eventually saving them all.
[0]: https://archive.org/details/pobediteli_nedr