it's nice that IM applicants who know they want to apply to subspecialty after residency still put stock into the sort of clinical IM training and cards exposure they receive as IM residents when weighing programs. imo, however, for a future cards applicant residency program prestige would still trounce one applicant over another coming from a less prestigious program, even if the applicant from the lesser known program has seen/done more clinically and received better clinical training.
don't take this the wrong way; wherever you go as a resident you still have to kick ass, put in the work, be productive from a research standpoint, and develop good relationships and connections. however, a prestigious program of good repute that likely has very active research faculty will start you off with a leg up compared to the rest of the field. it may be an unspoken secret but you've probably figured out that in our profession, background and pedigree plays a huge role in the selection process at every level.
if you want to match into a field as competitive as cardiology, my advice to you would be to try to go to the residency program with the 'best name brand'/'best reputation'/'highest tier and prestige' that you can get into, work hard, and hope for the best.