It's an interesting dive, but there are some thoughts to consider.
First is straightness, keeping a half metre tube straight to within the diameter tolerances we have is unlikely when things are being produced as cheaply as possible. Not to mention that the inner barrel might be perfectly straight but the outer has other ideas. I have pondered that a barrel curved intentionally downwards to force the bb to ride on its top edge (thus adding rather than detracting from the hop spin) could theoretically give better stability. I have a vague foggy recollection the americans had some sort of miracle barrel with a groove in it to acheive this but that's got as much weight behind it as the tk twist.
Second is the concept of stabilisation ie the whole riding on a cushion rather than bouncing off the walls, which i've yet to see the kind of full nerd level fea type analysis to confirm if it's even a thing, let alone give an idea of where the sweet spot is in terms of bore/length and the effects of bb weight and energy level. I suspect if it is you'll find that for a given ammo/energy level, too short gives too little time for the transition from bouncing to drifting, and too long reduces the pressure to where it can't even initialise stability in the first place.
And third is the everything else that goes on in our systems, which is why my typical summation is that barrel length is mostly irrelevant as simply getting the rest of the pew good enough to even notice the change is a challenge in an of itself.
Which ultimately boils down to barrel length being a choice made on other factors, like the handling, aesthetics, and wether your chosen field/style of play grants a benefit or a penalty to running a longer gun (ie poking through hedges outdoors or handling in tight spaces indoors)