Hide/Show in Emacs

I would like to restart the following discussion and ask if there is any update 5 years later.

VSCode allows users to collapse a module definition using a dropdown arrow in the sidebar, leaving only the signature visible. IMO this makes it easier to read code with nested submodules, especially if there are multiple signatures (one at each nesting level)

I am interested on what exists for Emacs specifically. The older thread suggests the hide-show minor mode which is a component of Emacs but this is for a fixed list of languages and one has to modify it for OCaml.