Tail numbers are assigned anywhere from a few days to a few weeks in advance - depending on the airline's proceedures. Any disruption in that will result in a specific a/c getting swapped out by another one. A good situation is to do an even swap.
For example, I was on the last UA
flight from SJC
last month. We had mx problems in SJC
. There was one more inbound to SJC
that was supposed to stay all night and be the first flight out in the morning. When it arrived, they sent THAT a/c back to DEN
with us on it and kept OURS there as the overnight one so they could work on it. That was convenient since it was available and was the same size/type. A lot of times that isn't the case. If there hadn't been another inbound that night, things would have been a lot different.
You are correct in pointing out that hub operations have a lot more flexibility - especially at the hub. Feeders with low frequency are kind of dicey.