I do have a similar experience. However, when I start compiling, the battery goes down in 2-3 hours. Simply because the compilation takes so much time...
Or if you have some spare basement space, pick up an old Dell PowerEdge or some HP equivalent from eBay and slap ESXi on it. Works well for me, and I use my PowerEdge T410 for some other home services. 12 cores, 24 threads and 64GB DDR3 ECC RAM goes a pretty long way.
If you’re an Emacs user, TRAMP makes running compilers on an external system feel almost completely transparent. New shells automatically open up on the remote machine and it feels almost local if your network latency is low enough.
You can also get NOS batteries on eBay for virtually nothing. Recently got a 68+ for my T440 for £39 delivered.
Be careful though as anything over 4 years old can be DOA as the batteries slowly discharge and the BMS in the battery itself disconnects them permanently for safety. This applies to ones Lenovo sell as well. I found this out when I bought the above but the seller sent another one out FOC. I dismantled the dead one, pulled the 18650s out and charged them up standalone and they were fine. Free cells!