Seemingly more plausible explanation: some form of underlying "individual biological healthiness" predicts both IQ and longevity.
Otherwise, you need to make the argument that IQ enables people to make better choices, but until recently in history human biology was a mystery to even the most educated. The famous "food pyramid", for example, promoted a high-carb diet and did not favour health or longevity.
Such underlying factors could be caused by random conditions; illnesses, environment, sleep habits, or very early in life - even in womb?