Is it necessary to sort time series data on datetime stamps? Say I have a time-series data frame for a bank that records number of cases filed for 16 districts as below (cases can be for many purposes - loans, credit cards, real estate, etc.):

application_date    branch_id    district    case_count
2017-04-01              1        A           40.0
2017-04-03              1        A           5.0
2017-04-04              1        A           4.0
2017-04-05              1        A           113.0
2017-04-07              1        A           76.0


But if I sort the above data by application_date, like so:

application_date    branch_id    district    case_count
2017-04-01              1         A           40.0
2017-04-01              62        B           5.0
2017-04-01              63        C           4.0
2017-04-01              64        D           113.0
2017-04-01              65        E           76.0


Considering that branch_id and district are categorical variables, does sorting affect performance of standard ML models like random Forests and gradient boosted models as well as their predictive accuracy?
Sorting data won't affect the training of your model, it is similar to changing the random seed.

It can affect the validation that you are doing. In case you do time series you can do sliding window or roll-out-window, that they need the data to be sorted before the splitting.

It seems that you want to do time series regression with supervised learning so what you probably want to do is change your problem to a supervised learning problem. You can see a bit more here. But this is me guessing what you wnat from a couple lines.