Redox state and interior structure control on the long-term habitability of stagnant-lid planets