Of course, even then you are only talking a grand or two pre-tax, which isn't the world, when it comes to programmer sallary, unless the old person has a bunch of dependents and the employer is paying for dependents.
I think it's pretty common for the employer to pick up most or all of the bill for the employee, and then have the employee contribute for their dependents, but it varies from company to company.
Y Combinator and, to a lesser extent, the better coding bootcamps, are trying to solve this problem and I feel we should be supportive of that and encourage more of those initiatives (and I'm not looking to start another subthread about the effectiveness of coding bootcamps, but merely pointing out that they are an attempt to solve the problem of mentorship at scale).
Old dogs might not learn new tricks, but people can.