Okay, here's my attempt at explaining what I think happens when working breeds are lost. Assume the border collie is the theoretical breed, where many strong workers existed in the original breeding pool and the need for their work was not lost or reduced but instead the dogs became less and less useful for it.
I believe it helps to think of the different levels of workers in more concrete groups, even though, in reality, the scale from all to none is graduated. Imagine something such as a dart board, with a bull's-eye and several circles that indicate areas farther and farther from the middle target. Let's say the bull's-eye circle is red, the next circle is orange, the next yellow, and the very outside circle is white. The actual area within these circles varies depending on the number of dogs in each class at any one time.
Now let's define the groups of dogs in the different colored circles. Please remember all of these categories in this hypothetical situation represent the genetic potential of these dogs. In other words, this is what's in the gene pool. I'm not talking about what people think the dogs are or don't know whether they are or not due to not having tested them:
Red circle (bull's eye) = The very top working border collies. A working definition might be dogs who are exceptional enough to save a great deal of time and manpower for a livestock operation.
Orange circle = Useful dogs who save time and manpower for the operation but who are not top quality.
Yellow circle = Dogs who will work a little, but wouldn't be considered useful workers on a real livestock operation because they would cost time and cause too much trouble. IOW, someone may want to pretend they're actually helping, but they really aren't and sometimes they're hindering. Although they may show some herding instincts, it's not the right package for work.
White circle = Dogs not interested or not capable of doing anything with stock except maybe chasing. So, not useful or way less than helpful.
Livestock working ability is comprised of many complex traits. These traits all need to fit together just right and in the right amounts for the dog to be the complete package, and be considered a top worker -- the bull's-eye. Achieving this package with the consistency needed requires stringent evaluation and selection for working ability every generation. Because of the complexity of reproducing behavioral traits such as these, it's difficult to get this package that is a top worker, in every pup, or even close, despite crossing the best to the best. This is partly because some dogs, for whatever reason, aren't good breeders, no matter how good they, themselves, are. So let's say if only red circle dogs were crossed, only 80% of that number of red circle dogs would be produced in the next generation. (This is a hypothetical number -- it may actually be less.) Therefore, breeding only red circle dogs will not replace all of the red circle dogs, and the number of red circle dogs will drop each generation if only these crosses are used.
As with other breeds used for other purposes, many a top sire gets bred to a mediocre bitch. Because the working genes are still highly concentrated in the border collie gene pool, the chances of hitting upon a dog who may not be a top worker herself but is a good breeder, are still pretty good. This type of good breeder would be mostly in the orange circle with a few in the yellow circle, but almost none in the white circle. Breeders of these top working sires may take a stud pup from these crosses to increase their chances of hitting on a good breeder should their top bitches not be, or not cross well their sire. In other words, the top breeders still rely on the peripheral pools of dogs who are not as good themselves but who are good breeders, to provide some of their next generations of top red circle dogs. As long as the emphasis is on breeding for work and the momentum of most of the breeding is going toward breeding for the bull's-eye and concentrating only the working genes, the number of red circle dogs will be replaced each generation and maybe even expanded.
Now, suppose the breed becomes popular for dog shows, pets, and dog sports such as agility. Suppose these people do not only buy puppies from the working bred dogs. Now instead of a mostly dead end gene pool -- dogs that will not be bred, these dogs with no working ability will be bred. The number of white circle dogs increases. And since people seem to want to claim their "borders" can still herd with the best of them, or the sport dog people need to tap into the working traits for success in their endeavor, they will look to the working circles for breeding to try to get these traits in the pups. Regardless of how it happens, however, now the momentum has changed and the working genes are being diluted, instead of concentrated, in this peripheral gene pool that has formerly been the source of good breeders to help replenish the red circle top workers. As this progresses, the good breeders in the peripheral gene pool become more rare, the yellow circle fades more to white, the orange fades more to yellow and the red fades more to orange. Unable to replace themselves without the help of the strong working genes formerly present in the peripheral gene pool, over time, the number of dogs truly in the red circle diminish until the gene pool is too small.