I played around with this a while back but never found a reliable formula. At first I just tried eating more fibre, then discovered that soluble and insoluble fibre have different effects, and eating too much can have a reverse effect. Then there was the aspect of consistency, because firm waste is more rewarding and satisfying to pass than soft. Although there were some apparent successes, it proved impossible to have a nice full nappy every time, even with an unchanging diet. The most predictable effect was that skipping a meal during a medium-fibre diet usually produced a big, solid load 12-18 hours later.
I tried again when I started 24/7, mainly in search of a diet that would keep the messes firm and not too smelly, to make them easier to deal with when messing and changing away from home. I wanted to cultivate the habit of just going in the nappy when I needed, without worrying too much about what it was going to be like. Again I could not find a sure-fire way to have the kind of messes I wanted, although in a way I had been overly pessimistic. I would hold off using the nappy because I wasn't sure what it was going to be like, and then when I used the toilet it would turn out to have been fine to do in the nappy.
Ultimately, I wear nappies for my convenience and not the other way round. I eat and drink what I enjoy and what is healthy, and then whatever I do in my nappy is 'right' for me. Sometimes there are nice surprises!