This wasn’t foresight. As the comment you responded to stated, the Voyager probes were built to explore the outer planets, nothing less and nothing more. The fact that they are still working is essentially a fortunate coincidence, helped by there not being much that can damage a spacecraft in outer space.
Just like Opportunity lasted for 15 years, while its identical twin Spirit only lasted for 6. The Voyager probes could easily have failed long ago, they just didn’t. But not because of planning or foresight. Sometimes things simply work out well.