I think internships are an accessory to research. I believe that the positioning and frequency of internships doesn't matter as long as they are relevant to one's PhD [by relevant I mean that if work done on internships could be written down on the final PhD dissertation and/or lead to meaningful publications]. Finding/Securing the correct internship that could positively propel one's PhD is a challenge, but it is doable.
I believe having the wisdom to decide whether an internship could contribute to one's research depends on where you currently stand in the PhD timeline. There is a distinction between a PhD student and a PhD candidate, which I want to point out as you mentioned both the terms.
A PhD candidate is an advanced PhD student, which means he/she is aware of the fundamental concepts of a particular research area (since a PhD candidate has successfully qualified the core requirements of a dept., which involves getting satisfactory grades in certain key courses for his/her specialization track). So he/she is in a better position (in terms of judgement) to not settle for just any internship (as there are significant amount of internship opportunities for PhD students [this of course depends on country/funding/discipline]), but only the ones that ties well with one's PhD goals. For instance if someone's specialization area is compilers, then doing an internship on quantitative research might not be very useful in the near term.
For PhD students (in first or second year), since they are (relatively) new in the field and learning the ropes (as majority of their time is spent on courses, reviewing/reading papers, and doing research in whatever time is left), seeking counsel from mentors/adviser regarding internship is fruitful. They could help in a multitude of ways.