After setting up your custom TOC, set every listing/button/item to Initially Hidden.
In the TOC, each listing will have an action:
Show: Target: This Object; Condition: If [targetname]: Equal To 1.
[targetname] is the variable that will correspond to each listing. When creating these variables, make sure that you check the Retain Variable Between Sessions box, so this change will be permanent.
On each page that would trigger a TOC listing, you’d add a variable:
ModifyVariable: Target: [targetname, same as TOC would be helpful]; Type: Set Equal To:; Value: 1
Repeat as necessary.