When uploading a file geodatabase to be used as the basis for a feature service, "Domains also remain in the geodatabase, but are not accessible from the hosted feature layer." (
https://doc.arcgis.com/en/arcgis-online/share-maps/publish-features.htm#ESRI_SECTION1_F878B830119B44...) But if you publish that same geodatabase from ArcGIS to AGOL as the basis of a feature service, the domains are honoured. Since the domains are saved in the geodatabase, it should be possible to have them used as part of the feature service definition.