I think I've found a workaround for this problem, though I don't know why it helps. Here are the steps I took to get rid of hangs:
1) In the Thinkpad BIOS menu, Kernel DMA protection is turned on (should be on by default if OS optimized defaults are on). Thunderbolt BIOS Assist seems to contribute to hangs. 2) apmd(8) must be running without any flags that affect hw.setperf (currently I'm running it without any flags for suspend/hibernate support). Automatic performance mode (-A) produces hangs when the X1 Carbon is charging, usually at higher battery levels. I wish I had a better understanding of this. I'm sharing what I do know in case someone with similar hardware can benefit from it. -- https://amissing.link