Is it better to publish a few papers in one journal, or one paper each in several (equally good) journals? Suppose there are several journals with the same impact factor.
Is it better to submit my papers to one of them or each time I finished a manuscript it is better to submit to an equally good journal that I have not published in yet.

I am early in my career and I already published two papers in the same journal and I am going to finish my third paper, which potentially can be published in the same journal as my previous two papers.
While I cannot state authoritatively that this is the case for all disciples, it is my experience that it does not matter.  Equally prestigious journals have equal prestige.  Moreover, while the reputations of the journals you publish in is certainly not irrelevant to your future career prospects, you should expect your work to be evaluated at a deeper level than just looking at journal names and citation counts.

If you want to pursue a research career, the people who will be considering hiring you are going to want to know about the substance and significance of your work.  What journals you publish in may be relatively low down on the list of things that they look at.  Hiring committees want to see clear explanations of why your work matters from your reference letter writers; and the committee members likely will read some of your publications for themselves and draw their own conclusions about the quality of your work.

For reference, when I was a post-doc, I published the vast majority of my papers in a single highly-regarded journal, and it was never an issue when I was looking for permanent faculty positions.  I do not think the issue of having too many publications in a single journal has ever come up in the search committees that I have been on either.