apt-cacher-ng, the hand-written C++ version, is 16K LOC for the core. apt-cacher-ultra does a lot more. Seems like a pretty reasonable LOC count to me.
What are you basing your assertion above on?