Hey, if you google 'stuck shed' you'll get a tonne of results of how to prevent it/ fix it, its quite a common issue. You're right in that a lot of things could be causing this, but I feel given the snake is otherwise healthy, its most often humidity thats the issue. To prevent this you can buy little digital hygrometers that measure the humidity level, they're really cheap and fairly accurate - plus if your humidity levels end up being okay then you can rule it out and look for other possible causes of stuck shed (stress, husbandry stuff, infection etc). If you find out your humidity is on the lower end, make sure your enclosure has a big water bowl that the the snake can fit in. It provides them with the opportunity to soak if they want, but also the larger bowl will naturally bump up the humidity in the enclosure.
To help them get this stuck shed off you can either mist them down with some water every now and then or you could try giving letting them soak in a bath of luke warm water for a while - again theres lots of youtube vids that will give you more indepth instructions that you might find useful, good luck!