I have been in contact with Autodesk support about this.
In Revit 2020 we have an Electrical Equipment family which represents a Data-switch. This family is set to 'Part type' 'Other Panel'.
This family is loaded into a project. From this project through 'Edit Family' we change the 'Part type' to 'Switchboard'.
This adds several extra parameters to the family like 'Max #1 Pole breakers'.
We load this family into the project so the parameters are available in the project.
We change the 'Part Type' back to 'Other Panel' and reload the family into the project. This will keep the parameter 'Max #1 pole breakers'/'Max number of circuits':

This limits the number of data connection that can be made on the data switch.
This works fine for Revit 2020.
In Revit 2021 the 'Max #1 Pole Breakers' has been replaced by the 'Max number of circuits' parameter.
If we use the same methode with this parameter you can connect more than the set max number of circuits for the data switch:

Autodesk concluded with:
"There currently indeed is an inconsistency as "other" panels could not be limited using some kind of "Max number of ports" parameter.
As Data switches don't have breakers having the "Max #1 Pole breakers" parameter in a data switch is not supported in Revit. Using the hack that was working in 2020 was a really clever workaround (love it) but is currently not a design scenario in the current version."
Since we need to control the maximum number of connections to any panel i would like to suggest this to be implemented.