I’ve had two warranty frame replacements (different bikes) from Trek but I was the original owner for both.
Both times I took the bike back to a different Trek dealer than where I brought it from as we’d moved house and both times the dealer needed to take a copy of the original purchase receipt. I don’t know if they have some system to check this against, I know the dealer recorded the frame numbers of the warranty replacement to register them so even if I didn’t register the warranty Trek would have a record of who the owner was.
One of the reasons I’d buy another new Trek is the warranty, I see it as one of the things you’re paying for when you pay the premium for a new frame rather than second hand and I think it’s completly fair on Trek’s part that they only cover the original owner.