I think it's also worth mentioning that choosing to use third party code is an opportunity for you to give back to the community.
Most of the PRs on the projects I follow come from people that are using the code in their own applications. They'll find a small problem and push a fix for everyone's benefit, instead of leaving it up to the core maintainers.
Absolutely, this is why popularity of the project matters, as it means it is more likely to be tested and actively maintained. And as a good citizen you should participate!
Also: if you find you need to write this non-core functionality in-house you could consider open sourcing it yourself. If you're right that this is a need not filled by existing libraries you might just find a community grows around your version to help you maintain it.
Most of the PRs on the projects I follow come from people that are using the code in their own applications. They'll find a small problem and push a fix for everyone's benefit, instead of leaving it up to the core maintainers.