I think I'm getting too far down the rabbit hole on this one for the knowledge that I have (and don't currently have the spare time to do the necessary learning for something that is obviously more involved than I was hoping it would be).
So I think I'll run with using category.id, as I can get that working at present and worry about possible issues that new categories might present when they occur. By then, I might have had time to learn what I'm doing.
Many thanks for your help, Steve.