@matt @ariadne (self-plug:) here's how removing a junk drawer libraries looks like: https://github.com/FRRouting/frr/pull/8508
I also think we should maybe move the "modularize and use dlopen() a bit more" slider a bit further out; and maybe there's room there for DX improvement as well (dlopen/dlsym are… clunky…). If the decision to include features can be made by installing packages, Debian doesn't _need_ to do "just the features required", it's the end user doing that with more and smaller packages.