This is not possible to do as you have it stated here.
The only way to construct frigates and cruisers is through the frigate factory and a starbase with the factory upgrade (tech).
The only way to construct capital ships is through the capital ship factory.
This is hard coded.
There other two ways to spawn/create ships is through abilities.
The CreateFrigate buff instant action type is meant to create temporary frigates (temporary do not use fleet supply). It can be used to make frigates that take up fleet supply too, however this method does not prevent a frigate from being created when there is no available fleet supply which can easily result in negative fleet supply.
The SpawnShipsAtPlanet (see vasari phase gate) buff instant action type can be used to spawn frigates and will observe fleet supply limits. However, this mechanism has all ships that are spawned phase jump into the planet. It is possible to spawn capital ships this way, but capital ship supply is ignored which can easily result in a negative capital ship supply.
Hope this helps.