flawed replacement phones

I've had my replacement iphone for approximately one year and the jack has stopped working along with some microphone issues. I've also had problems with faulty replacement phones in the past. Is there anyway to ensure I'm not going to drop $250 for another "refurb" phone that just then fails? I'm guessing the days of getting a new phone are over.