The technique is known as; ; 'selective-display' and has been available for a very long time (I; ; started using it back in the good old Emacs 18 days).
A; ; section is hidden by creating one very long line were the newline; ; character (C-j) is replaced by a linefeed (C-m) character.