I own both, and in my opinion, if I had to pick one, I would choose Machfive - it's not only a sampler, it's also a synth, offering FM, wavetable, granular, and drum synthesis, amongst others. There's so much 'stuff' in M5 it's really kind of overwhelming, and to fully take advantage of everything you're going to have to put in some time.
If you're moving away from Logic, make sure you keep Logic's EXS24 instruments because M5 loads those, and I think Logic's EXS library is freaking fantastic. It's cool being able to load them directly in M5 - keeps everything easily accessible.
Kontakt has way more libraries available for it though - and this is why I use Kontakt. It's really just a preset player for me, but the libraries available for it are really good. There's lots of 3rd party support. Machfive loads practically everything made by UVI and Acousticsamples, but I don't see anyone else. The quality is super high though.