I’m not a Civil War scholar by any means, more of an enthusiastic amateur who knows more about it than the average bear, but I’ve never heard the bit about Lee really going after Harrisburg and specifically the rail lines for use as a bargaining chip. Any further information you have on that - detailed articles you can point me to etc, would really be appreciated.
Popular wisdom on the Pennsylvania Campaign has Lee going there to feed and supply his forces, getting them out of Virginia and giving the Shennadoah Valley a respite. Secondary goal was to try to draw the Army of the Potomac into a decisive battle on Lee’s terms.
Something that I’ve seen overlooked in discussions about Gettysburg is that while Meade couldn’t allow Lee to get behind him and between him and Washington, Lee was in a similar position. Lee needed to prevent Meade (or, rather, the Army of the Potomac) from getting between him and Cashtown Gap - his escape route to VA if things went bad.
It seems to me that if Lee was really going for Harrisburg he would have gone straight for Harrisburg instead of fanning his army out across a wide arc to the a Southeast like he did.
It comes from this book, which I have in paperback, but see now it's also available by Kindle.
The book and its authors are highly regarded in their efforts to provide backgrounds and explanations for what Lee did at Gettysburg, and why.
Among other things, it explores strategic thinking that Lee and Davis shared.
Their goals for this operation went far beyond a mere raid (such as Morgan's raid into Kentucky, Indiana & Ohio).
Instead they saw it as an opportunity to strike a decisive blow and break the Union's will to fight.
In this discussion, they mention a plan to take and hold Harrisburg's major rail yards, and at this point, I'm posting from memory (away from home) and can't tell you more details.
But, for whatever my opinion might be worth: it's a great book, and I think you'll finish it with a higher respect for Robert E. Lee as a general than the common view of his performance at Gettysburg would lead one to expect.