Food probably takes 24 hours to pass.
Mealworms of any size should be OK if the dragon was born in april- it should be pretty big by now.
To help digestion, just make sure the lizard has a good, warm basking area.
Coughing is probably not the mealworms. Probably a respiratory infection, and if a bearded dragon is coughing, usually the only hope for the lizard over the long term is treatment with antibiotics. Usually this kind of infection is caused by long-term mild temperatures (not enough heat for proper growth and digestion and immune system function, which if large mealworms are a concern at 5 or 6 months of age, could very well be the case) and/or poor cleanliness of the enclosure.
Dragons born in April should be closing in on at least a foot in length for slowish growers, fast growers will be more like 17 or 18" at this age. Check your heat and if coughing continues for a day or two, get the lizard to a vet for antibiotics. Even if the coughing is only occasional - like if you only hear it every few days at first.