As you've noted, YVR pre-clearance is only for flights leaving up until around 8pm.
All the redeyes to US leave from international D gates, which has its own security and separate airside, so you won't be allowed to go into US pre-clearance area as your flight won't leave from there even if you show up and try to go through security and CBP like 5 hours before your flight (they do check BP). You are not allowed to go from US departure gates to international / domestic airside.
You'll still check in at the usual UA counters landside, and then walk over to the international security. Since you'll leave from D gates, you will have access to the international MLL and the 2 priority pass lounges if eligible. Then you will clear immigration when you land in ORD - most definitely in T5 / M gates.
Also, when I did this back in June, UA did not open their counters for the redeye flights until 3 hours before departure, so not sure if that's changed.
Last edited by kevflyer; Sep 22, 2022 at 10:50 am