So you have two questions. one is about how to collect 'later' (post filtering) and the other is about your if statement.
probably avoiding early collection will be easiest as I think its as simple as moving it to after the filter.
as far as your filter conditions go, assuming that input$list might return multiple values for matching on branch, then the %in% operator should be used rather than ==
When I collect as shown in the first code snippet, I am achieving the target results, that is when All is selected, no filter is applied, and when an option I would like to be selected to show information from that branch, that works too.
Secondly, the user input will be selected one at a time, and not as multiple options.
Please check the this package GitHub - cardiomoon/dplyrAssist, as it contains the same syntax for dbplyr (almost) you can easily twick it to work with databases as well.
The widget will give yoou the list sort of ui that you are looking for.
Here the vignette RPubs - Document
You can add a conditional filter like the code below. Wrap this non-trivial statement in curly brackets and make sure you first pass the data frame (using '.') to the filter function. For additional data manipulation, just add a pipe after the closing bracket. Obviously, this would not be executed on the database.