Mina R You can do this, yes. This relates to https://community.esri.com/ideas/16701-keep-webmap-service-item-id-static#comment-78691
I do this in my property app www.sagis.org/map
The way I did it..
1. right-click on a layer in the webmap and click Inspect in the browser of your choice (Chrome, etc). This will open up the web Developer Tools. Look at the layer's HTML DOM (document object model) node ID. This will be the webmap ID plus the webmap's layer ID.
(Note that this changes randomly, each time you re-add the layer. (It can be changed back in AGOL Assistant but I do not know whether that would have any other implications, and so I just update it in my code if I need to re-add the layer, which I do because if you add layers to a service they don't always get picked up by the webmap because the web map specification does not presently stay in sync with services)
2. Create a click handler to click on the Expand node in your Web AppBuilder App's Layer List widget's layerlistview.js file.
Examples from my site are:
SAGISOrg_7276 is the root service, which I named "Map Layers". The rest i.e.SAGISOrg_7276_130 etc are sublayers of this service.
postCreate: function() {
this.refresh();
this._initOperations();
// kevin m override to click layers in layerlist....///
setTimeout(function () { // timeout needed i presume for dom to build
//expand these layers explicity...
//root service for sagis2018alllayers
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276"]').click();
//loma sublayers
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_130"]').click();
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_131"]').click();
//census sublayers
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_101"]').click();
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_102"]').click();
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_103"]').click();
//nwi wetlands sublayer //not a sublayer anymore
// document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_98"]').click();
//dfirm panels and cobra
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_159"]').click();
document.querySelector('[imageshowlegenddivid="SAGISOrg_7276_158"]').click();
//esri traffic
document.querySelector('[imageshowlegenddivid="Traffic_5483_0"]').click();
document.querySelector('[imageshowlegenddivid="Traffic_5483_4"]').click();
document.querySelector('[imageshowlegenddivid="Traffic_5483_5"]').click();
document.querySelector('[imageshowlegenddivid="Traffic_5483_7"]').click();