I think you are correct that a second random slave, who is reusing same number as a previous slave, would likely end up with the custom attribute which was originally assigned to the previous npc.Of course it works after all $npc is a generic object, but then
are you sure that giving an npc a custom property, will never have sideeffects, if the npc is sold/released/dies (slot is cleared via ClearSlot passage) and was an entry of the form $npc.avXYZ (with XYZ being above 100) and the slot (entry of $npc) gets reused? - There will not be sideeffects for "story-npcs" (as these entries are never reused for other npcs).
For a simple indicator, if mc should prefer to treat the girl good or bad, it is probably insignificant... But for other things in the future it could cause bigger head-aches.
I guess, best solution would be to add a sanity check attribute. If (orggirlname != girlname) {reset all custom attributes}
It could then routinely be checked in some often used function like gotoPage.