Off the top of my head: tailors embroider the clothing they make for customers and luxury clothing companies like Luis Vuitton engrave the customer's name or a message on products like wallets. IIRC even Apple used to engrave custom messages on some of their products for free.
Custom embroiders/engraves are basically a way to reduce the second hand market as fewer people want to buy a luxury product with someone else's name on it.
I would think that if they were really trying to check the secondary market, they’d allow engraving for iPhones. Surely that’s by far the one that cuts most deeply into the bottom line.