Hi and welcome!
What a wonderful old age!
Please be aware that mange mites are invisible to the naked eye; they bury their eggs into the increasingly inflamed and painful skin that a guinea pig starts fitting and can eventually die a slow and agonising death. Many guinea pigs do come with mite eggs present in the skin, which can make an appearance whenever the immune system is suppressed. In the elderly guinea pigs, this can be very sudden and dramatic. You need to use a good quality ivermectin or selamectin product; the usual pet shop stuff is too low dosed for any acute outbreak. Brand names differ from country to country. Your vet should be able to provide it.
Guinea Lynx :: Mange Mites
It sounds like advance glaucoma in the eye or otherwise a retrobulbar abscess (an abscess behind the eye). Unfortunately at this advanced age, an eye removal operation may no longer be feasible. Glaucoma in guinea pigs cannot be treated; it can be very painful and leads to blindness.
Links - Eye Conditions - Guinea Lynx Records
Your boy is also suffering from a penis prolapse; it is basically an inability to retract it again. Prolapses can often be fixed relatively easily. The penis may need to be checked for infection.
Older piggies are often too arthritic to clean themselves up; you have to do the job for them and clean their sleeping area twice daily - as you are doing.
Please gently wash the bum area, the underside and the underside of the feet with hand warm water to prevent urine scald (bare, increasingly sore skin) and infections getting into any cracks that could cause bumblefoot (foot infection, not uncommon in old guinea pigs with limited mobility that are unable to take their weight off their front feet while their blood circulation is no longer all that great). Make sure that your piggy is totally dry and warm before you put him back in the cage.
You may also want to check for possible impaction, which is caused by weakening muscles at the back end.
Guinea Lynx :: Urine Scald
Guinea Lynx :: Pododermatitis
Impaction Recovery - How To Help Your Guinea Pig.
My eight year old lady has the same nails on one back foot. I'm not sure whether it is fungal or just old age.
Since we have members from all over the world, we find it very helpful of you please added your country, state/province or UK county to your details, so we can tailor any advice as much as possible to what is available and relevant where you are instead of keeping it as general as possible. Click on your username on the top bar, then go to personal details and scroll down to location. This makes it appear with every post you make.
Can you see whether one of these vets is within your reach?
Recommended UK vets:
Guinea Pig Vet Locator
Recommended vets in some other countries:
Guinea Lynx :: GL's Vet List