I understand that the age of my accounts has an impact on my credit score. My oldest account, by a wide margin, is my federal student loan. I'm hoping to minimize my payments in size and/or how long I need to keep making them by transferring the debt to a collateral loan when I'm done with grad school. But would that damage my credit score by replacing an old account with a new one, or would it be recognized as the same debt and thus the same account? Would I be building my credit history, or deleting the oldest part of it?
If you are applying for a new loan product it would not be recognized as the same account. That could lower your credit score slightly by reducing your average age of accounts, though this hit to your credit score would be minimal. The closed federal student load would still stay on your credit report for 10 years before it falls off - positively affecting your average age of accounts during that time. After that 10 year period, it would fall off and could decrease your average age of accounts. However over that 10 year period your other accounts would age and the effect of the federal student loan being taken off would be negligible. I would only worry about the hit if you planned on a applying for a car loan or mortgage in the near future.
Are you getting a better interest rate on the collateral loan than what you are getting on the federal student loan. Usually federal student loans have very favorable interest rates. Make sure moving the debt elsewhere would be in your best interest.