Thank you for the further information about Phil.
As I am sure you can appreciate, issues with urination, feces, and skin can represent multiple issues arising at once or can be interrelated in our wee hamsters. As well, we do have to consider that since Phil is an older man in hamster years, that we can see organ issues and even immune suppression lead to health issues here. Furthermore, in either case both illness and advanced age can lead a hamster to slow down.
Now if you have not seen diarrhea but are seeing fecal staining of his back end, then this can often just represent that the hamster feels unwell (therefore a decline in grooming) or in older hamsters, arthritis (where getting to the back end is a struggle). Furthermore, in light of his potentially longer stools (which can often be a side effect of GI compression by something else in the abdomen), we have to consider that if he has an abdominal issue (ie tumor, chronically enlarged bladder due to a polyuric inducing disease) related to his signs as well. So, in Phil's case, the fecal issues are likely a secondary issue being induced by another issue.
Now if his bedding seems wetter more often and his urination behavior has changed, then he is likely experiencing increased urine production. When this happens, they often will go more urine, more often, and may demonstrate a lack of urinary control (both in the cage and when handled). When this happens it can be due to conditions like diabetes, kidney or liver disease, hormonal diseases and can be related to bladder infections.
Finally, the skin portion of his signs. Now the lack of changes to the skin does reduce suspicions of bacterial infection. Still if he is grooming more then he usually would and eating less (perhaps because he is spending time grooming), even if he doesn't show a focus on the bald area, I'd still be concerned that he is itchy. If he is, we do have to consider that he could have an opportunistic agent (ie fungal infection or mites) but we can also see hair loss and skin discomfort triggered by hormonal disease (ie thyroid issues) as well as kidney inflammation, and even tumors of any of the endocrine (hormonal) glands. Its worth noting that if the hair loss feels soft (as if hairs have fallen out and not been broken) and the hair loss pattern looks bilaterally symmetrical, then hormonal concerns would be an increased worry here for him.
In this situation, I am quite concerned that wee Phil is either being bombarded by an opportunistic skin issue preying upon an underlying issue affecting his urinary system or that his hormones/kidney health is compromised. In this case, it would be ideal to have a check up with his vet. They can appreciate the nature of his skin issue (address any suspicions of mites or fungal issues) and also palpate his abdomen for sinister lumps or bumps. As well or alternatively, you could consider submitting a urine sample to your vet for evaluation. This can be collected if you put Phil in an empty litterbox or if he is kept overnight in an cage that is free of bedding. The vet will be able to check the presence of white blood cells (a marker of infection), glucose (a marker of diabetes), and the urine's specific gravity (which can indicate kidney issues or seen alongside diabetes). Depending on the findings, the vet will be able to aid you in determining the cause for his multitude of signs and whether this is something that can be addressed and managed for Phil.
Finally, just as you have asked how long Phil has left, I must note that he is an older lad. Hamsters only live an average of 2.5 years, therefore at 19 months of age he is getting into late middle age. And with the aforementioned issues, his weight loss, and appetite decline, we have to consider that if this is to progress then it is likely he may only have weeks to months left. But if his issues are a bombardment with treatable issues, then he may have another year ahead of him.
Just in case you do not already have an exotics vet, you can check the RCVS register (LINK). As well, a lot of the vet schools (ie Edinburgh, Bristol, RVC, etc.) will either have an exotics vet on site or will have ties to one that they can refer you to (ie. Glasgow). As well, you can check here http://www.aemv.org/vetlist.cfm .
I hope this information is helpful.
If you need any additional information, do not hesitate to ask!
All the best,
Remember that if you have any lingering questions or concerns, please reply so that we may continue our conversation. I will be happy to work with your further and do everything I can to provide you with the service you seek. Please remember to rate my answer when you are satisfied (with4-5 stars or a happy face) so that I may receive credit for my assistance. Thank you & have a great day. : )