Hi Stefan,
It looks like you'd like to modify the behaviour of the toc-selective-expandable macro. The necessary changes for this particular case would be contained within the toc-linked-selective-expandable-body macro. Both are defined in $:/core/macros/toc.
You'd need to redefine (override) toc-linked-selective-expandable-body to:
1) remove the tiddler link
2) display the tiddler's caption/title within the fold/unfold button, for tiddlers that have more tiddlers downstream in the ToC, and
3) display the tiddler's caption/title by itself for tiddlers that have nothing below them in the ToC hierarchy. (If you wanted, you could make just these captions tiddler links)
I suggest making a new macro tiddler (tag it with $:/tags/Macro) with something like the following in it. I've highlighted (I think) all the changes I made. Obviously anything that's commented out could just be removed.
\define toc-linked-selective-expandable-body(tag,sort:"",itemClassFilter,exclude,path)
<$qualify name="toc-state" title={{{ [[$:/state/toc]addsuffix<__path__>addsuffix[-]addsuffix<currentTiddler>] }}}>
<$set name="toc-item-class" filter=<<__itemClassFilter__>> emptyValue="toc-item-selected" value="toc-item" >
<li class=<<toc-item-class>>>
<!--<$link to={{{ [<currentTiddler>get[target]else<currentTiddler>] }}}> -->
<$list filter="[all[current]tagging[]$sort$limit[1]]" variable="ignore" emptyMessage="<$button class='tc-btn-invisible'>{{$:/core/images/blank}} <<toc-caption>></$button>">
<$reveal type="nomatch" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="open" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/right-arrow}}<<toc-caption>>
</$button>
</$reveal>
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$button setTitle=<<toc-state>> setTo="close" class="tc-btn-invisible tc-popup-keep">
{{$:/core/images/down-arrow}}<<toc-caption>>
</$button>
</$reveal>
</$list>
<!-- <<toc-caption>> -->
<!--</$link> -->
<$reveal type="match" stateTitle=<<toc-state>> text="open">
<$macrocall $name="toc-selective-expandable" tag=<<currentTiddler>> sort=<<__sort__>> itemClassFilter=<<__itemClassFilter__>> exclude=<<__exclude__>> path=<<__path__>>/>
</$reveal>
</li>
</$set>
</$qualify>
\end
The definition of toc-caption can be found at the top of $:/core/macros/toc.
Hope that helps,
Chris