You already have an active thread on this topic.
Adding additional threads will not help you get better answers.
+1 for Harb's reply.
As for an answer, as much as it is, if indesign freezes when manually mapping styles to tags (or the other way around), there is not much you can do. In my experience that always happens if the indesign document is large. Most you can do is post a bug report with Adobe and hope for the best.
As a workaround, you can iterate through the textStyleRanges, test each one and create the xml structure, but it's not a easy solution.