As others have noted, some things are already possible either directly or via css and shortcuts. It’s likely that we will add more shorcuts to make folding/unfolding faster.
A full blown outliner (with the relative data structure) is probably better developed as plugin.
I am gonna move this to plugins and open a FR for indent/unindent. (there was already one)