Hi Jan and Zdeněk,
You should be able to change the primary site administrator account with no issues, even if the site is federated. Make sure that you change it from ArcGIS Server Manager and not by editing the config files.
In ArcGIS Server Manager, navigate to Security > Settings > Primary Site Administrator Account, then click on the edit pencil. It will allow you to change the username and password of the primary site administrator account.
Note that when you make changes to your security settings, your server and/or services may restart.
This should not break your federation at all, and you do not need to do anything after this. To make sure, I just tested it in my environment (10.8), and my hosted services are still working fine.
Hope this helps!
- Rachel