As borrowing costs spike and exits get harder, private equity firms are increasingly buying smaller, specialized companies that can be bolted on to existing holdings.