Sounds big ^_^
Here's some insight
Upgrading
With a backend server like firebase or ajax with some PHP/mysql, you could store the upgrade process and have the server indicate duration and times.
Battling
The game described can definitely be made with the construct 3 multiplayer.
As for teams, some logic could involve something as simple as a boolean check for team.
Messages
A message system is easy to embed, there are examples for chat systems,it uses the same connections as the rest of the game (construct 3 multiplayer).
Storage
As mentioned for the upgrades, use a backend server to store data.
For unique names, checking the data if a certain name exists would be the way to go.
Good luck