Earlier quoted context omitted.
Depends on when the poetry was written. Classical Chinese was in use for over two thousand years, with the written Mandarin-based vernacular Chinese only replacing it in the last century. So later poetry (e.g. during the Qing) may not have been written with Middle Chinese pronunciation in mind. For example, the somewhat (in)famous poem, 'Lion-Eating Poet in the Stone Den' consisting entirely of homophones in modern s…
It's hard to overstate the intellectual puzzle this is! Classical Chinese scholarship had a developed body of proto-linguistics, including rime spelling, a system for phonetic transcription and analysis, which transcribed sounds using Chinese characters purely phonetically. It was used to indicate the pronunciation of characters, as well as foreign words in bilingual dictionaries and so on: https://en.wikipedia.org/w…
It would make sense then if there was much earlier linguistics / folk etymologist, etc. in Chinese history. Whereas I didn't think think anything like modern linguistics got going until the enlightenment creation of the Classics' modern form.