For making your own sampled instruments Kontakt is definitely the way to go. Once you get to know how the engine works behind the scenes (routing, groups, sample playback etc.) it’s quite versatile. There’s a pretty good reference manual to guide you.
It’s possible to program stuff in Kontakt too using KSP-scripting if you need some custom functionality that you can’t do with the built-in controls. But that’s a completely different thing and you need to know Kontakt pretty much inside out before KSP-scripting makes any sense.
Programming VST plugins … don’t waste your time unless you’re a math genius who really wants to get into hardcore C++. But if that’s who you are, many VSTs these days are developed using the JUCE-framework.