I have created some hierarchy in my section headers (see next picture below) to keep track of it all, however, even when folding the sections i still have to scroll a lot and it's still a little cumbersome to get around.
but if it is a shinyapp, it is probably worth reconsidering structure as and when you have the time to refactor - this is a nice explanation of some of the principles that make it easier to manage these things in the long run
hmm, I see.
from this, you can see what defines "foldability"
Foldable Regions
The following types of code regions are automatically foldable within RStudio:
Braced regions (function definitions, conditional blocks, etc.)
Code chunks within R Sweave or R Markdown documents
Text sections between headers within R Markdown documents
Code sections
so if you really want that, I guess you could slap curly braces around whatever you want to include in your hierarchy, but
a) that feels like abusing the system somehow
b) I'm not sure whether it would affect your code at all (I can't see why it would, though)
Personally, rather than folding and scrolling, I find it much easier to navigate either with the document outline (ctrl/cmd + shift + O) or the section navigation menu at the bottom of the script panel, but you know how you like to work.
This is not a direct answer to your question but if the code of your Shiny app is becoming too long, I recommend using Shiny modules. You can learn about them here and here.