A ability to preserve layer and table IDs between map service updates is a great feature added at 10.3.1. Unfortunatly it seems that it has to be manually applied to each dataframe when an .mxd is created.
Is there a way to have it enabled by default? Map publishers rarely remember to enable it and I occasionally end up having to edit my applications after updates anyway.
Edit Found a relevant thread on geonet, it looks like you can't set this option through ArcObjects but you can set/change layerIDs on individual layers
Edit 2 Link to an idea I submitted at the ArcGIS ideas web site in case anybody else would find this useful.