I’ve previously used Joplin to extract notes from Evernote.
A new version of Joplin is out with an interesting option. Joplin 3.2.11 allows importation of OneNote zips. These can then be exported as clean Markdown.
The sequence is: within OneNote, export a notebook as a zip file. Then, import the file into Joplin. Finally, export as MD. Works flawlessly.