Is a ToC possible in a tagged document? Yes, of course. Tagging is all-important within InDesign.
But is your crashing really even related to this moment? Maybe not.
So, have you tried:
1. Resetting InDesign preferences and restarting and trying again?
2. Have you experimenting with the possibility of a partially-corrupt file?
The first effort is to export your INDD to IDML and then re-open the IDML to reconstitute an INDD clean file.
If you are in ID 2021, it is actually supposed to sniff the file as you open it. If it detects a sour odor, supposedly it whisks it off to Adobe land where it gets a complete manicure/pedicure/hairstyling, and then is sent back all clean and healthy again.