There was no intention to take Baltimore or to launch a full-scale invasion into Pennsylvania.
So do you thus hold that Lee's primary or sole motivation was to remain in Maryland for the whole of the remaining campaign season, presumably to fight a battle to the west of South Mountain?
If so, then one might presume that Lee should be ready for a battle to break out once he threatened Pennsylvania (and his 'advance guard' indeed reached the state line), but he was not.
A report having been received that a Federal force was approaching Hagerstown from the direction of Chambersburg, Longstreet continued his march to the former place, in order to secure the road leading thence to Williamsport, and also to prevent the removal of stores which were said to be in Hagerstown.
Interestingly looking in the correspondence Lee declared his intent to move towards "Hagerstown and Chambersburg" as early as the 9th, though it's possible that only Boonsboro was meant.
Lee's report claims that the reason why South Mountain was not strongly held was that Lee desired to fight the Army of the Potomac as far as possible from Washington, though I have to wonder how true this is because it suggests Lee
relied on his opponent advancing slowly; certainly Lee piled into South Mountain with almost everything he had available, though his report points out how much the Confederate cavalry slowed McClellan down.
Interestingly the comparison of Lee's correspondence of the 12th (before McClellan hit him) with his report (written after McClellan hit him) produces an apparent contradiction.
Lee's correspondence of the 12th declares that it was "always his intention" to march on Hagerstown even before he crossed the Potomac.
Lee's report declares that he only took Hagerstown to secure it from capture by a reported Federal force (which presumably didn't actually exist). The report in question doesn't seem to be in the ORs, but that doesn't necessarily mean much.
What this means then is that, per your interpretation of the situation, Lee:
- crossed the Potomac east of the Cacotins in order to menace Washington and Baltimore, and thus ensure the removal of enemy forces from Virginia.
- crossed west into western MD in order to firstly capture Harpers Ferry (to open a supply line west of South Mountain to support him in western MD) and secondly to threaten Pennsylvania, with the reason behind both of these to provoke a general engagement in western MD with the Army of the Potomac.
- was surprised badly by McClellan arriving several days before he was planning on McClellan arriving.
This is a plausible plan, but it has two problems with it - the first problem being that Lee declared himself to be so heavily outnumbered at Sharpsburg, and that he in fact spent the entirety of the 15th-18th withdrawing over the river. The question that this raises is simple - if Lee planned a battle in western Maryland, how exactly did he think this could possibly be won if he struggled so to hold off an attack by only a portion of McClellan's army on a series of strong defensive positions?
The second problem is simpler. McClellan sent off his force towards the Cacotins before SO191 was even obtained (Cox's division marching at about noon, and his not being the first force to depart as he was told about a mix-up ahead of him per his account) on the 13th, and it's a single long march from Frederick to Boonsboro - as Lee should have known as he'd marched it with Jackson and Longstreet on the 10th. Even if McClellan only made about eight miles a day instead of the fifteen that Jackson and Longsteet had managed, he should have known it was possible for McClellan to reach South Mountain on the 14th - thus threatening the rear of McLaws in the Pleasant Valley.
Thus, in order for Lee's timetable to hang together, he would have to have been planning on:
McClellan to move no further than Middletown on the 13th and no further than South Mountain on the 14th. (Two six mile marches, or two eight mile marches for a force moving on Cramptons Gap.)
Harpers Ferry to fall on the 14th. (A delay of a day would mean the loss of McLaws entire command.)
His entire army concentrated and able to offer battle before McClellan reached him, either at Sharpsburg or further north around Hagerstown.
Frankly this seems like Lee is sequencing events far too closely to be safe and completely disregarding what his enemy could possibly do to him, and it's because of the juxtaposition between Lee
planning an engagement in western MD as his primary objective (by strongly provoking McClellan) and Lee being completely unprepared for McClellan to march more than half as fast as Lee did over the same route (despite enacting the exact provocation he was planning).