Reach out to the communities to add a more stable marker in the HTML output for pronunciations.
This could be a data-* or class attribute, ideally directly on the anchor with the href to the source of the pronunciation ogg file.
Where should we bring this up? WP:VPT?
Once that is done we can fix the pronunciation detection in the /page/media, /page/mobile-sections, and /page/mobile-html endpoints. (mobile-sections works but only because of a hack).