Made a batch over Christmas and another one last night/today. I've gotten to where I start them in the crock pot late at night and cook on low, then have them for dinner the next evening. They turn out great. No worries about undercooked beans.
Its taken me about 20 years to come up with my "formula" so I'm not going to give it away just yet but I will share some "secrets." Take or leave these as you see fit.
First, as already mentioned, to the extent you use onions, celery, etc. saute them first. High heat delivers some flavors the lower, simmering, heat doesn't. You don't have to nuke the onions like they're going in a California dip, just until they start to go toward clear. Then, add garlic and cook until you smell it.
Second, andouille sausage works fine as a flavoring agent, if you will. There's no need to go to the trouble of pickling pork and all that nonsense. If you like and can get ham hocks, great, but I like to lightly brown the sausage and put it in, then let it fully cook with the beans. You can put it in raw, too. Again, high heat/low heat. Your choice. Try it both ways.
Third, get good quality beans. I don't buy store brand beans anymore. In some higher end grocery stores, they may be the same as the good brands but I think I threw a lot of bean pots out due solely to the beans being low budget.
Finally, and you can ignore this at will, but I don't like using "just" water. I use chicken stock in all my bean recipes. I might add a little water at the end to bring the liquid level to where it needs to be but water adds no flavor.
My recipe is a combination of about 3 different ones plus some variations on those 3. The key is trial and error but to me, cooking them low and slow (like brisket) and getting them soft is the most important thing.