How can I create a functional Table of Contents manually?

I can do this: select Generate HTML table of contents. It works. As far as I can tell, everything with a title goes into it, no indentation.

Nothing else works. I use Copy Documents as ToC or as Copy Documents as Structured Linked List and paste into a text file Front Matter > E-Book > Contents, then use Use flat table of contents. I get a table of contents but the links don’t work (in or

If I check both Generate HTML table of contents and Use flat table of contents, I get an error and the .mobi file is not produced.

I have had the best luck following the instructions in : Create an indented, bulleted list in a text editor, paste it into a new Contents page, and accept the options in the window that pops up, and eliminate the page numbers. The result looks nice and the links work nicely–in Scrivener. The compiled .mobi file doesn’t have active links.

I have tried every combination I can think of, not just the few I’ve mentioned. I’m out of ideas. Help?

Mac OSX 10.14.6, Scrivener 3.1.4.