I'm not sure if it generally hurts your chances... In a way, I think it shows your commitment to medicine (because if you thought applying once was a pain, re-applying is far worse, both in that you get to spend more money and for me there was a lot of emotional memories of being rejected the first time). That's what I would like to think anyway. I think that is especially true if your application the second time is stellar. I am a second-time applicant and I had the same questions as you at first... I never got an answer really, but I decided to re-apply to ~8-10 of the same schools as last time + apply to 8-10 new schools.
So far, I have 2 acceptances (neither of which I applied to 3 years ago). I am also waiting to hear from 2 more schools I've interviewed at -- both of which I applied to 3 years ago, and 1 of them I interviewed at (and waitlisted) while the other 1 I did not even get an interview invite.
At a school I interviewed at (and later accepted... i.e. this is a school I did not apply to 3 years ago), my interviewer commented "I see that you're a re-applicant" and commented how he was surprised I didn't get in before, etc. Initially, I concluded that all schools must know of my previous AMCAS application then... because nowhere in my application did I mention my re-app status b/c I was also worried of the stigma. But it just occurred to me that one of my rec-letter writers might have mentioned it in their letters (maybe in the context of, I've known her for xyz years, she's re-applying and in the past 3 years I think she's really improved xyz). So I do not know whether schools have knowledge of my past application track, esp if I didn't apply there previously.
Anyway, but a point I want to make is that this school knew that I was a re-applicant, but I was accepted back in one of their earlier batches 🙂 As another poster said, I think it matters more how you've improved since then.