Text this: Unveiling the chemical fingerprint of phosphorus-rich stars