Ninja ninja ninja ninja ninja ninja ninja, it appears... Still, I've written it now.Even a partial space elevator would be a useful thing, as gravity is a system of diminishing returns.
Wut? you're not building "as far up as practical", you have to
start from the stable orbital point and 'build' down.
Here's what you do for a space elevator: Get a 'top' station in geostationary orbit, where you're 'tracking' the ground. (Or geosynchronous, where you're doing a probably insignificant figure of eight above the ground.) Lower a cable down towards the Earth. At the same time either 'lower' a cable
outwards (because further out than geostationary, the cable is trying to 'fall up'), or move yourself upwards a little as well. You're aiming that the centre of mass[1] of you+'groundside cable' stays at the geostationary point. You also need to ensure you're not spinning (or, rather are spinning at exactly one rotation an orbit, in the same plane)[2]. If you can get something heavy at the top end (captured asteroid?) it doesn't need to be anywhere as long outwards as you need to be inwards to reach the ground.
Eventually, your cable reaches the ground. Attach to the prepared groundstation, and reel out the counterweight (or length of counterweighting cable) a bit further outwards and you can maintain a bit of controlled tension. Now send your 'cable enhancer' spiders up and down, as necessary, to change the cable from being a mere thread to being the item that you can reliably send capsules up and[3]/or down.
Now send up more cable-making materials, send them to other points along geostationary orbit and get building, because humanity is going to want more stations for increased traffic, no monopolies, more protection against single-point-of-failure (sabotage or accident), etc. Although would be a megaproject-and-a-half in the first place, and whoever (probably a consortium) stumps up the cash for the first elevator might well be seeking monopoly (either of a single elevator, or of
all of them). That's for humanity to work out though.
Anyway, assuming no other gravitational influences, Earth geostationary orbit (forgive the tautology!) is 36,000-ish km above the planet's surface. Areostationary orbit (Mars) is 17,000-ish km, which along with other planetary characteristics (planetside dust-storm damage to the cable aside) makes it a more practical effort to try to accomplish. Especially while we're still sending stuff
to Mars, anyway, perhaps with the cable. For the Moon, one might imagine that with the Moon tidally locked in rotation to the Earth that the 'selenostationary' point (i.e. w.r.t. the moon) is Earth. But you couldn't put a cable to Earth, anyway (except, with some clever mechanics, to either meet some mobile ground-station running along an equatorial track, or some 'gimballing' and tether-anchor at either/both poles with enough initial height to clear the ground[5] and enough slack (dealt with somehow or other[6]) to deal with orbital variation)...
But with Earth gravity exerting a pull as well, there's actually the Earth-facing Lagrange point (56,000km or so) and its opposite (slightly more[7]). No problem with atmosphere at the Moon's surface, either. But, OTOH, there's a lot less opportunity to choose the spot of your ground stations. And L3-5 Earth/Moon points (also relatively stationary to the Moon, ignoring distortion by influence by Sol gravity) are awkward. L4 and L5 are essentially Earth-distance (360,000km or so, give or take), and L3 is in opposition, thus means you have to get
around Earth (perhaps attach the cable to your 'Dyson cage' you've been building around Earth ever since you finally linked together every geostationary structure into a ring, and started to build out over towards the poles!).
Or so says my reading of the situation, but it's been a couple of decades since I touched the actual maths.
[1] Sort of. But I won't go into the maths.
[2] Although see also the potential use of a series of shorter non-geostationary 'spinning tethers' to pick up things at their ends and transfer craft further out. Sounds complex to me. Electrodynamic tether operation would be needed to maintain/regain orbit, unless you also balance with downward transfers.
[3] I minded to deploy two cables, one for each direction, with a 'hard link' at the top end. A longer platform. But I haven't worked out the maths of how any given separations at top/bottom would be affected in any curvature of the cable. Anyway, the idea is that you don't need to engineer "one side of cable up, the other side down" methods which means a partial linkage of vehicle to cable, or periodic mechanical 'stepping across' of an upward-going vehicle's linkages across a downward-going one. Also you can double-time the upward (or downward!) traffic at need,
plus should there be a failure of one cable you
may[4] still have the other in order to get the broken cable's replacement materials up there and constructed again.
[4] Assuming no damage to the second cable by the first, of course.
[5] As it initially leaves 'earth-anchor' horizontally, or even downwards, as a far more complex catenary 'suspension'
[6] You know those "no-snag travel modem cables that has an 'S-'shaped path through the core spool and unreels from opposite ends, with a spring for tension/re-reeling (and ratchet)? Well, I thought about something like that being the centre of a Pluto?Charon tether link (only with no ratchet, just some 'sprung' tension) to deal with orbital variation. Or even something at the common barycentre with a geared mechanical linkage between two
different spools to pay out/feed in the correct proportion of cable from each end.
[7] Why use the outer Lagrange point? Well, sending and receiving craft on non-Earthsourced/bound trajectories. The counterweight station of a Lunar L2 station would be ideally placed to 'drop' interplanetary missions from, for zero initial fuel use, and then you'd just need to adjust for awkward timing and movement out of the moon's elliptic plane.