... How can one ensure that if a hardware component fails in a couple of years that the project will not have to be redesigned and built from scratch?...
Short answer: you can't.
When I worked in the Telecom industry, we (my colleagues and I) designed products meant to have a supported life of 30 years. Component choice was always an issue. We would avoid single-source components except in special cases.
Even so, End-of-Life buys were common. When a component was about to go out of production, we'd buy enough to last the expected production and service usage. That would often prevent a redesign, but not always - redesigns would still happen due to part obsolescence.
In some cases, redesigns would occur before obsolescence became an issue, because the redesign would provide a significant competitive edge (cost reduction + performance improvement).