One feeding of mealworms isn't likely to kill your dragon with impaction. I wouldn't worry about it too much, especially if he has pooped already. Though most likely the poop that came out was old food, not the mealworms.
The danger with mealworms is feeding them almost exclusively on a very regular basis, then they have a much higher chance of causing impactions. The risk is also higher in small dragons more than with adults. Adults don't seem to have as much problem than young dragons.
Another problem is mealworms really do not have enough nutrition to be a stable insect diet, nor are they a balanced nutritional food source. They are also rather high in phosphate which dragons should not get too much of. Superworms are better as they are more meater and a bit more balanced but are just too big for very small dragons which is why I don't recommend feeding superworms to dragons under 10" snout to tail tip length.
Overall, better to stick with crickets if the more expensive insects are not available to you or outside of your price range for regular feeding. Mealworms as a treat are fine as well. In the market today, there are many more healthier insects available, such as phoenix worms (great for small dragons, very wiggly, high in calcium and protein, soft bodied so they lack the hard exoskeleton that can cause problems with small dragons, are not too expensive and easy to keep and pretty easy to find online now.) Other insects are silkworms, hornworms (feeders only, wild caught hornworms will kill your dragon as they are toxic due to their diet (tomato and tobacco leaf eaters. Hornworms sold as feeders are fed a special diet lacking the toxins which make these worms deadly), butterworms, many species of roaches. The bigger roaches only their young should be fed to dragons.
-----
PHLdyPayne