A single failure isn't the end of the world. Top programs likely out of reach, but plenty of good programs will still consider you. A solid score on S2 will help alleviate any fears.
More realistically, it doesn't matter for top programs at all, and it is probably more of an issue for middle programs since so few things actually distinguish those candidates.
People vying for Big 4 programs (and even some of the T20 in competitive locations) come from one of the following categories:
1) Average performer at a T20 med school
2) Perfect on paper (all H in clinical, AOA/GHHS, 270+ S2, etc...)
3) "It factor" applicant
There's a lot of overlap between those groups, obviously. I'd argue that for top programs, especially in IM, PDs don't care so much about stats. They just don't want a liability, and everything above that is "it factor," which is why T20 MD applicants do so well as they disproportionately have it factor accomplishments. They want leaders in the field: future Nobel laureates, chairs, NIH directors, etc... If OP doesn't have some sort of it factor, then those top programs were already out of reach. If they do, then the remediation won't matter as long as they perform well the rest of medical school.
For mid-tier programs, I think this becomes a bit more of a liability. The MD/PhDs with CNS papers, the URMs with 40+ pubs, the Rhodes/Fulbright scholars, and the entrepreneurs with successful ventures have already been spoken for. So what's left is normal med students whose main attribute is academic performance and perhaps personality. In this case, PDs may ask if they want someone who's failed something over someone who hasn't. Others won't blink an eye as long as the applicant hasn't failed anything else. The better question to ask is, "Why did the remediation happen? What adjustments are you making to ensure you not only don't fail again, but that you excel going forward?"