It's often a problem related to the myth of muscle memory. You have to train ugly.
Some skills lend to randomizing better than others, maybe? Eg, practicing a bunny hop with an adjustable bar and changing its height with each rep, or moving obstacles around before and after the hop. Laying out multiple corners and adding removing obstacles from the path.
I suppose too, we could spend just enough time on the training field to achieve decent form for the skill and then move to the trail and session each corner (log, ledge, etc) that appears 2 or 3 times and move on.
I agree that the 'muscle memory' concept is just a metaphor but I can see why - those ingrained reactions make it feel like it is your msucles responding because you are not engaging your concious mind. In fact your conscious mind often gets in the way when you engage it.
As an IT nerd I prefer a RAM vs ROM analogy though - blocked practice writes the movement patterns into RAM, but when you shut down you can lose it. You need to take the time to write the movements over to ROM and that is mainly due to mental review, variability and real life usgae. But without the initial moves to punt the info into RAM , you can't then transfer to ROM - no matter how many videos I watch or learning posts I comment on ;)
As an aside I've learnt to flip a watering can and catch it by the handle through a series of variable repetitions. Pretty much every morning for the last year I've topped up the birdbaths and then attempt to flip the can once or twice walking back. Initially I dropped it almost every time or caught it awkardly by the top handle. After a year or I can catch it by the side handle 60%+ of the time. It's been fascinating to watch my brain figuring it out.