"Contact wire height is planned to vary between 16 to 23 feet (4.9 to 7.0 m), depending on overhead clearance required, with the messenger wire another 2 to 5 feet (0.61 to 1.52 m) above that, and pole height will vary between 30 to 50 feet (9.1 to 15.2 m). Nominal clearance under the contact wire will be 23 feet (7.0 m) to accommodate freight and non-electrified passenger rail service."
"CSX lists three clearance heights above top of rail for double stack service:
Doublestack 1 — 18 ft 2 in (5.54 m)
Doublestack 2 — 19 ft 2 in (5.84 m)
Doublestack 3 — 20 ft 2 in (6.15 m)
The last clearance offers the most flexibility, allowing two high cube containers to be stacked."
A nominal 23 feet clearance under the contact wire is plenty for most double stack containers.
I'm assuming the shorter 16 feet clearances for Caltrain are in the tunnels entering south San Francisco, where there are few if any freight trains customers north of them. There are few freight customers north of the wye tracks that head to the rail bridge across the south bay. And I do not see any intermodal yards using Google Earth where containers trains can load or unload north of that wye.