We are grateful to the directors K. Schuster, P. Cox, S. Dougherty, T. van Zeeuw, R. Blundell and T. Beasley for granting us discretionary time at NOEMA, ALMA, APEX, SMA and JVLA. T.K. thanks L. Matrá for an introduction to Markov chain Monte Carlo methods. R.T. acknowledges support from grant 2017/27/B/ST9/01128, financed by the Polish National Science Centre. A.A.B. and T.F.G. acknowledge funding through the DFG priority programme 1573 (Physics of the Interstellar Medium) under grants GI 319/3-1 and GI 319/3-2, and the University of Kassel through P/1052 Programmlinie ‘Zukunft’. K.T.W. acknowledges support from the International Max Planck Research School for Astronomy and Astrophysics at the Universities of Bonn and Cologne, and also from the Bonn–Cologne Graduate School of Physics and Astronomy. This study made use of APEX, which is a collaboration between the Max-Planck-Institut für Radioastronomie, European Southern Observatory and Onsala Space Observatory. Some of the APEX data were collected under the programmes 095.F-9543(A) and 296.D-5009(A). This paper makes use of the following ALMA data: ADS/JAO.ALMA#2015.A.00013.S and #2017.A.00030.S. ALMA is a partnership of ESO (representing its member states), NSF (USA) and NINS (Japan), together with NRC (Canada), NSC and ASIAA (Taiwan), and KASI (Republic of Korea), in cooperation with Chile. The Joint ALMA Observatory is operated by ESO, AUI/NRAO and NAOJ. The National Radio Astronomy Observatory is a facility of the National Science Foundation operated under cooperative agreement by Associated Universities. The IRAM 30 m observations were carried out under projects 183-14, 161-15 and D07-14, and those with NOEMA under W15BN, E15AE, S16AV and E16AC. IRAM is supported by INSU/CNRS (France), MPG (Germany) and IGN (Spain). The IRAM observations were supported by funding from the European Commission Seventh Framework Programme (FP/2007-2013) under grant agreement number 283393 (RadioNet3).