If I am not mistaken, this precise issue was attacked by Dirk Smit during 1990s in a series of papers on Communications of Mathematical Physics. I am not sure why his papers are not quoted more widely in the number theory community nowadays. One reason may be he joined industry. But experts in my social circle are certainly familiar with his work.
Some relevant links are His paper on height function over moduli spaces using triangulations and His paper on obtaining "critical" string measure (for the dimension=26 case?) as well as an earlier paper on a continuous version of the height function (see the end).
I would suggest to start reading from the third paper and moving back to the first and second paper. The third paper basically answers your question and gives much more (not just how to triangulate the surface and how this is related to dessins d'enfants, but also the distribution of the height function near the boundary of $\mathcal{M}_g$). A general survey by Yuri Manin can be found via this link.
I should add some suggestions on questions like "...So what next???". To follow up on Dirk's work, I would suggest to focus on explicit examples like $g=2,3$ and do some concrete calculations. Recently a paper independently replicating a lot of Dirk's result (https://arxiv.org/abs/1902.02420) was published. I do not think the discrepancy he raised in the third paper was addressed, though.