means that
remaining active and engaged in life is preferable to deteriorating through idleness. The saying does not require working beyond one's physical limits.
When it is better to work until you die than to be idle just because you are old., the saying “Better to wear out than to rust out” is appropriate.