If you use a single map document and publish the service there is an option which will allow you to preserve the layer indexes for the service.
Refer Map authoring considerations—Documentation | ArcGIS Enterprise
I was interested in you comment about preserving layer indexes, so thanks for posting that Shan. However I don't think this work on ArcGIS Online. Publishing from ArcMap 10.5 fails if I alter the layer indexes away from 1, 2, 3... whilst Pro 2.0 only works with 1, 2, 3... or 0, 1, 2... (i.e. always have to start index numbers from 1 or 0, and have to be sequential). I was publishing new services. Anyone know if there's a way to deal with this on ArcGIS Online?
I have multi-layer feature services on ArcGIS Online, which I'm coming to regret due to, amongst other things, the layer index numbers getting changed (in a way that I don't understand yet) when I try to update data from ArcMap/Pro. This means that I then have to fix any maps and apps that are consuming the data.
Cheers,
Andy.