The case of low population density is missing the point,Tweedbank-Carlisle could be a diversionary route for Edinburgh-Carstairs-Carlisle, & a useful freight route. Numerous times I see coaches outside Edinburgh Waverley heading to Carlisle,a journey of about 2h45m,Glasgow-Carlisle diverts via Kilmarnock. There's plenty money getting wasted on vanity projects right here in Edinburgh that would be better spent.
Please see post no. 50 in this threat for a detailed explanation of why freight is not the answer.
As for a diversionary route;
Firstly, it's going to be long. It's already an hour to Tweedbank, and it's going to be at least another hour and a half from Tweedbank to Carlisle, more likely two hours.
Any diversionary route is going to be about the same duration, if not longer, than a replacement coach. That will seriously reduce it's attractiveness for Avanti and TPE.
Suddenly, a three and a half hour round trip from Carlisle, it becomes a six and a half hour round trip. I just cannot imagine that even on weekends, either of those operators are going to want to send that many units to keep the frequency running. If you reduce the frequency to keep the number of units needed the same, then you reduce capacity, which means in the end, you're going to need coaches to keep capacity the same anyway. Furthermore, it's going to be quicker for many passengers to catch a replacement coach anyway, as opposed to waiting at Carlisle for the 1tp3h that goes on a mystery tour through the Borders.
(I'd also add here that do you think that either Avanti or TPE would be willing to train enough staff for that, especially given that Avanti doesn't have a crew depot at either Edinburgh or Carlisle)
Secondly, infrastructure:
Both the 397s and the 390s are electric only. Edinburgh to Tweedbank is going to be wired, but that's at least five years away yet. As for the unbuilt infrastructure, are you seriously suggesting we build a new, fully wired route over the hills and around the mountains, so that on the two or three weekends a year then WCML is closed north of Carlisle, we can send 1tph from Carlisle to Edinburgh, instead of diverting people to change at Glasgow, or via Newcastle?
Thirdly, capacity. Fundamentally, if any extension is built, its going to be single track; there simply isn't enough demand for double track. That limits capacity. How many loops you build will depend entirely on how much money you're willing to spend, and I can absolutely guarantee you, from a position of vast experience, if it is built, which it won't be, there will be exactly enough loops to run 1tph in each direction, nothing more.
What's already there, from Portobello Jn to Tweedbank, has a theoretical maximum capacity of about 2tph. Unfortunately, as I also pointed out in that post, it was built with that theoretical maximum in mind. We build it dirt cheap, without successive signal sections, so that you can't flight trains; one train per single line section at a time.
If you want to use it as a diversionary route, then that's okay, let's begin there. You've built the 50 miles from Carlisle to Tweedbank. Let's even say you've built it double tracked, electrified throughout. You still need to either spend an enormous amount rebuilding the existing section to accommodate the diversions, and rebuild all the bridges to remove all the horrific speed restrictions for freight.
If you don't do that, then you have to bin at least half the ScotRail service every time you use it for diversions.
Fundamentally, I think it's more beneficial for the Borders to have 2tph to Edinburgh all the time, then binning half of the service to run a 2.5 hour non-stop diversion to Carlisle.
Basically, if you want to spend the billions it would take to build the thing to any sort of specification to be able to take the diversions and freight, then you're spending billions to mitigate a problem that doesn't happen very often at all. A billion would get you a single line, capable of 1tph in each direction of 3 car battery units, you'd be looking at many times more than that to fix what's already there, and build everything else to a specification capable of accepting 390s.
Also, just think about the cost, spread over the number of days in twenty years that the WCML is closed. What about every single day the WCML is open? Are you just leaving it there unused? Are you running 1tph down from Edinburgh to Carlisle, through nothingness and carting fresh air? What's the BCR there, how much would you have to charge per passenger to break even? Is it genuinely worth it to spend that money on something that's never ever going to carry enough passengers to justify it's own existence?
It's just cheaper, easier and probably faster to just run buses for passengers, and send the freight via Dumfries or via Newcastle.