First, make sure you're using the latest version, since all the issues with chapter splitting reordering the chapters should be fixed.
When Sigil generates an automatic ToC it relies on you having specified the chapter heading using heading tags (<h1>, <h2>, etc). If chapters have gone missing then you probably didn't set their headings properly. See the
manual.