Based on this GitHub comment I found a very easy solution:
list.html
{{ range .Sections }}
<li>
<a href="{{.Permalink}}">{{.Title}}</a>
</li>
{{ partial "lists/recursive.html" . }}
{{ end }}
partials/lists/recursive.html
{{ $child_pages := union .Sections .Pages }}
{{ range $child_pages }}
<li><a href="{{.Permalink}}">{{.Title}}</a></li>
{{ partial "lists/recursive.html" . }}
{{ end }}