I've just had a long talk with Gabriel and we finally agreed that section folding/collapsing does not interact well enough and by design cannot interact well enough with caching to be viable. Instead we have agreed to work toward an alternative solution based on the category system, where you would add
[[Category:Deletion debate]]
to a talk page, and you could view that category to get a list of all deletion debates (already possible) *and* an expanded view of all these pages, with edit links to each of them (not yet possible). Here we could use ESI includes for the individual component pages which would be cacheable.
Another feature we discussed is the moving of individual sections to a different page from the section editing screen.
I'll think about other options to solve this problem. The caching issues here are trickier than I'd seen, as sending lots of purges for all sections appears to be too problematic in terms of performance. Too bad about the wasted effort, but sometimes you just have to ditch it and start over.
Regards,
Erik