I assume that you are already already using the make_duplicates_real operator, but are you using the ‘use_base_parent’ property? If so, you know what the instance’s name was- so you also know the name of the empty that serves as a parent once you complete this operation. From there it’s just a matter of getting all of the mesh objects linked to it and doing the rest.
Also, you might not be aware that it’s not necessary to traversing the modifier stack if all you want to do is apply everything. The convert operator already does this (yes, it converts a mesh into a mesh- i found it odd when I found out as well).
I agree, it would be super handy if they had a “flatten instance to single mesh” operator (in Modo we called this “freeze mesh”, add that to the python python papercuts thread, or make a feature request at RCS and you’ll have my upvote.