IMO, just about any characteristic, whether mental, physical or emotional, is to some extent heritable. It can be direct, ie get the gene(s) & you get (or carry) that characteristic. It can be polygenetic where more than one gene is involved in expression of a particular trait. It can be indirect. For example, cleft palate & club foot in humans, are more commonly seen where the mothers are of short stature, possibly due to intra-uterine crowding. A genetic pre-disposition might be mediated by hormonal, nutritional or other environmental factors. However, heritability remains a factor in all of these scenarios.
Good breeders strive mightily to produce sound, healthy, long lived dogs. Any that don't, will never be good breeders. Healthy, sound, long lived bitches of good background should be bred to healthy sound, long lived dogs of good background. Nothing can guarantee that only healthy, sound long lived pups will be produced, but it certainly helps to stack the deck.
While it's worthwhile to look at the role vaccinations, diet, supplements & exercise contribute to health & longevity, beware those breeders who neglect, or decline to discuss, genetics & the particulars of their lines. For me personally, it's a HUGE red flag when myriad excuses are proffered for breeding stock which all too commonly expires at 6, 7, 8 or 9. Or breeders that proudly, lovingly point to breeding stock that died young for any reason but an accident.
Unfortunately, all too many 'good breeder' algorithms focus on just about everything but what's actually produced & how well that matches with what the pup seeker needs/wants.