You're right that it's a mix of confidence and skills. I'd say I'm poor at both but I know when I feel more confident, I'm less worried about the technique. But if I had better technique, maybe I'd feel more confident.
I'm keen not to break bones.
Unless you have access to some physical coaching, your best way to improve your technique is by practice [you honestly won't pick up
much from reading stuff on the internet, even if you find something written by the best coach in the world].
To practice you need to ride through some mud - preferably without breaking bones
If you ride slowly through really slippery stuff, then after a few embarassing clipless moments and/or stumbles you won't have any fear of injury. This will likely make you more relaxed (which will improve your technique a bit for free), then just keep practising the same section - natural trial-n-error will then make gains in technique.
If you only have
fast slippy runs to practice on, that's more dangerous and more tricky; the learning curve is a lot steeper

Climbing a steep grassy bank after rain might make good practice.
( If I was starting from scratch, I'd use tyres with little tread, pumped up hard. Then any mud becomes a slow slippy bit! )