Manning have a fair amount of docs and support for preparing a TOC, including soliciting opinions from outside experts. I imagine it's similar for other publishers.
I didn't feel like I was being made to follow a template. In fact the TOC changed a lot over the course of writing.