I got a 6.4 as my first diesel. It didn't have engine problems, had been a reman under warranty, otherwise stock with 155k miles that I got for 7k.
I think I'm roughly 4k into making it a reliable vehicle. It's down for days at a time, as it's my first diesel, I do my own work, and I work on it in a gravel driveway and not an enclosed shop so everything just takes longer (and I'm limited by daylight hours). If I had other people working on it it'd be twice the cost, and I don't know if I'd trust the workmanship. If I had to do an engine swap right now, I'd drive/tow it out of state as I don't trust my local shops.
A lot of it can be done on your own, but it requires tools and skills. I just used an oxygen cutting torch for the first time today, and had to use it under hood when a bolt rounded where it was the only cutting implement I could get there. I have to weld stuff tomorrow for the same repair project and replace tools I broke.
If you don't have a wide variety of skills and tools, comfort picking them up on the fly, friends that can make up the gaps, or deep pockets to pay others - a 6.4 is not for you.
And I say that as a diesel newbie who got one not knowing what he was getting into, loves it, and wouldn't get rid of it. But they're not for everyone