How do I breed a Ralts with 6 IVs?
The problem is that while the Destiny Knot ensures that 5 IVs will be inherited, The IV's could come from either parent, not just the one holding the Destiny Knot. Even when one parent is holding a EV-enhancing item, It just ensures that that parent passes on that particular stat. And that one guaranteed stat counts as one of the five that the Destiny Knot passes on. Meaning that even in the most ideal circumstances, you will have at most a 1/32 chance of a 6 IV child.
Ultimately you are going to need multiple breeding/hatching sessions, each time swapping out the Ralts in the daycare for one of the newly hatched ones with superior IVs.
Step one:
The first step you've already completed; breed any old Ralts with the 6IV Ditto (one of them holding Destiny Knot). So, the IV chances on the the first round of breeding look like this (assuming the Ralts you are starting with has zero perfect IVs):
The most likely outcomes are two or three perfect IVs, with with about 31.2% each. This seems to reflect your results. Four IVs are less likely at 15.6%, but if you hatched enough eggs from the first pairing, it might come up. I will continue under the assumption that it hasn't.
Step two:
Now take one of the 3 IV Ralts that you hatched, and swap it with the initial Ralts you have in the daycare. For the sake of simplicity, in my examples I am just going to be filling in the IVs in order (HP>Atk>Def>Sp.Atk>Sp.Def>Spd), which may not match the Pokemon you are using, but it will not affect the overall numbers - particularly if you are going for 6IV, and not 5.
After hatching a number of these eggs, roughly 30% would still have only 3 IVs, but the chance of 4 IVs jumps to 43%, and you have a fair shot at 5 IVs at just under 20%. However, I will continue with the steps assuming the best you were able to get was 4 IV.
Step three:
You can skip this step if you managed to get a 5 IV Ralts out of step 2. Swap the Ralts in the daycare with the 4 IV one obtained in the last round of breeding and start hatching again.
At this stage, anything less than 4 IVs don't come up all that often, and 5 IVs will occur in roughly 34% of all hatched eggs. Keep breeding until you get a 5 IV Ralts.
Step four:
This is ultimately the most frustrating stage of breeding, as even if you had two 6 IV parents, the odds are not any better. Take the ditto out of the daycare, and have it hold the EV-enhancing item that corresponds to the IV that your 5 IV Ralts does not have (For my examples, the Ralts will lack speed, so I'd give the Ditto a Power Anklet). Give The 5 IV Raltz the Destiny Knot, and put it in the daycare with the Ditto.
This is the best chance you have. The EV-enhancing item will ensure that the IV your Ralts lacked is passed on by the Ditto. Then of the remaining 5 stats, all are 31 - but one is not transferred. It is generated from scratch, meaning an egg has a 1 in 31 chance of being a perfect 6 IV Ralts.
Technically some of the numbers in steps one, two, and three could be improved by having the Ditto holding an EV-enhancing item (of any IV that the current Ralts lacks), and having the Ralts hold Destiny knot. However I have one major problem with this: Sometimes after the tedium of breeding, hatching, and checking IVs - I neglect to take the item off the parent, and have been known to release or wonder trade them away before realizing it, and the item is lost.
Additionally, it was brought up in the comments that an Everstone would be better than an EV item for one of the parents to hold if you want a specific nature. This is true. If you are aiming for a specific nature, in addition to the numbers in the above table, you have a 1/25 chance of getting the desired nature (or 1/5 of a neutral one), which would make the chance of a 6IV+nature child 0.13%.
Comparatively, if you already had the correct nature on one of the parents and had it hold an Everstone, the nature is guaranteed, and the chance of a 6IV+nature child is 1.88%. That's a little more 10 times more likely than without an Everstone and only half as likely as 6IV+[any nature]. This of course assumes that either the Ditto, or one of the Ralts you've started with or bred has the desired nature.
You don't have to give any Power item to you Pokemon, they're pretty useless while breeding, they just pass 1 IV.
The thing you need is a 6IV Ralts, or at least one with some maxed IVs. If your "parent" Ralts doesn't have any maxed IV you have really poor chance to hatch a 6IV Ralts at the first time.
Every time you hatch a Ralts with better IVs replace the parent Ralts you keep at the Day-Care with the new one and continue this procedure. With a 6IV Ditto you will easily get a 4-5IV Ralts in few eggs.
PS: You better give Ralts an Everstone to pass the nature instead, and the Destiny Knot to Ditto, to ensure you that the offspring will inherit 5IV from his parents.