Whatever the reasons are for "Service disabled: DBLoadBalancer", Title::getArticleID (and hereby LinkCache::addLinkObj) should simply not fail with "Service disabled: DBLoadBalancer" and just return 0 for an unavailable ID or DB connection.
[4eb69185a048af297309d534] /w/mw-config/index.php MediaWiki\Services\ServiceDisabledException from line 340 of /var/www/w/includes/services/ServiceContainer.php: Service disabled: DBLoadBalancer #0 /var/www/w/includes/MediaWikiServices.php(509): MediaWiki\Services\ServiceContainer->getService(string) #1 /var/www/w/includes/GlobalFunctions.php(3089): MediaWiki\MediaWikiServices->getDBLoadBalancer() #2 /var/www/w/includes/GlobalFunctions.php(3075): wfGetLB(boolean) #3 /var/www/w/includes/cache/LinkCache.php(267): wfGetDB(integer) #4 /var/www/w/includes/Title.php(3222): LinkCache->addLinkObj(Title) #5 /var/www/w/includes/Title.php(4295): Title->getArticleID(integer) #6 /var/www/w/includes/Title.php(2572): Title->exists() #7 /var/www/w/includes/Title.php(2687): Title->getRestrictionTypes()