There is nothing preventing the appointment of a former president to the Supreme Court. Which would do good for the country even longer.
President Taft did become Supreme Court Chief Justice Taft.