Context. The different theoretical models concerning the formation of high-mass stars make distinct predictions regarding their progenitors, which are the high-mass pre-stellar cores. However, no conclusive observation of such objects has been made to date. Aims. We aim to study the very early stages of high-mass star formation in two infrared-dark massive clumps. Our goal is to identify the core population that they harbour and to investigate their physical and chemical properties at high spatial resolution. Methods. We obtained Atacama Large Millimeter/submillimeter Array (ALMA) Cycle 6 observations of continuum emission at 0.8 mm and of the ortho-H2D+ transition at 372 GHz towards the two clumps. We used the SCIMES algorithm to identify substructures (i.e. cores) in the position-position-velocity space, finding 16 cores. We modelled their observed spectra using a Bayesian fitting approach in the approximation of local thermodynamic equilibrium. We derived the centroid velocity, the line width, and the molecular column density maps. We also studied the correlation between the continuum and molecular data, which in general do not present the same structure. Results. We report, for the first time, the detection of ortho-H2D+ in high-mass star-forming regions performed with an interferometer. The molecular emission shows narrow and subsonic lines, suggesting that locally, the temperature of the gas is below 10 K. From the continuum emission, we estimated the cores’ total masses and compare them with the respective virial masses. We also computed the volume density values, which are found to be higher than 106 cm−3. Conclusions. Our data confirm that ortho-H2D+ is an ideal tracer of cold and dense gas. Interestingly, almost all the H2D+-identified cores are less massive than ≈13 M⊙, with the exception of one core in AG354, which could be as massive as 39 M⊙ under the assumption of low dust temperature (5 K). Furthermore, most of them are sub-virial and larger than their Jeans masses. These results are hence difficult to explain in the context of the turbulent accretion models, which predict massive and virialised pre-stellar cores. However, we cannot exclude that the cores are still in the process of accreting mass and that magnetic fields are providing enough support for the virialisation. ALMA could also be seeing only the innermost parts of the cores, and hence the cores’ total masses could be higher than inferred in this work. Furthermore, we note that the total masses of the investigated clumps are below the average for typical high-mass clumps, and thus studies of more massive sources are needed.