Is it possible on a dolly-camera to set the route/railtrack in script? like set point A and B through script and then set the camera active and make it follow the track?
You should be able to do it in script. I'm pretty new to Cinemachine but I think if you were to create your virtual cameras (you probably have a prefab for it) in a co-routine then you can add them as needed with increasing priority. That way your CineMachine brain will automatically blend between them. If you create a custom blend in code you can control the time between them or you can use the default blend if you don't really care about the specific timing.
But I still don't know how to write it or what to use.. I can't find any documentation on how to write the code or how to use the different classes etc..
CinemachinePath owns an array of waypoints. You can assign this array from script. Look at the CinemachineSmoothPath script, it has inline documentation. Set the m_Waypoints field to be the array of waypoints. You can change them dynamically, and any vcam following the path respond. On thing: After changing the wayoint array, be sure to call path.InvalidateDistanceCache() to force recalculation of the cached info about the path. You can activate/deactivate a vcam from script simply by calling SetActive() on its gameObject.