So being mentally strong just means having a good team and winning a lot?
There are a few factors.
Let's say that you are either weak, normal or mentally strong.
Weak players under the right coach/teammates/circumstances can turn into normal.
And normal players can improve into strong.
On the other hand, in bad surroundings, even normal players can turn into mentally weak (Barca in the last few years).
So, on top of player's individual mental strength, there are some factors which can improve individual mental strength, like:
1. a coach who is good in that area, implementing winning mentality, fighting spirit, self confidence (let's say Klopp)
2. leaders in the team which will lift the team and take the responsibility in tough moments (Barca lacked this)
3. older players who will guide youngsters (let's say Puyol or Ramos). It can't be any older player, though. How will Busi guide you and turn you into mentally strong player and a leader, when he himself never was one?
So, a player with 5 years of guidance under Puyol has a higher chance to turn into a mentally stable player in the future than someone guided by Busquets.
4. outside factors: if your team has won several big titles after coming back, all players get a boost on their mental strength since they have done it already, they know it can be done and a lot of pressure is off.
On the other hand, teams/players who lost too many times might be broken forever, like current Barca (Mats), Man City (Kdb in big CL KO matches), Messi before he won Copa America
4. another set of outside factors which make you less sensitive and soft, like tragedies.
For example, your country being at war, your teammate being seriously ill or a teammate died, a family member of a key player died etc.
So, mental strength is not set in stone.
There is your "biological natural skill", some are softer, some are tougher.
But on top of that there are social factors like teammates, leaders, role models, a coach, random life events and circumstances, team's proven winning or losing streaks.