There is no guaranteed way to breed a 6 31 IV Pokemon, no trick to it with items. (Well, that's slightly inaccurate, but I'll explain)
So as we all know, with the Destiny Knot you guarantee 5 IVs to pass down from the parents, which leaves the 6th to be randomly generated. If you breed a 31/x/31/31/31/31 with a 31/x/31/31/31/31 you have a 1/6 chance of passing down the IVs you want. However, when that randomly generated IV is generated as a 31 (1/32 chance), it's possible that you have passed down that imperfect attack as one of the passed IVs and you still only get a 5 IV.
This being so, the best way here to get a 6 31 IV Pokemon is to simply breed and hope. Once you have one 6 IV parent, you put it in and your chances go up by 50% for when that 31 is generated. If you have both your parents as 6 31 IVs, you have a 1/32 chance of breeding a 6 IV Pokemon.
The alternative method is the forecast method, where you have two parents in the daycare (preferably both Magikarp) that have no 31 IVs. Then save before getting an egg, hatch it and check to see if it has a 31 IV. But I'll let people google this as there are guides out there which explain it better than I could.