Mealworms have been proven safe for decades, they may not have the nutritional value of an exotic insect or a. domsetica but they are a fine treat.
Careful with any new insect, sometimes your bearded dragon will eat too much and throw up or get slightly impacted. Just be careful and ease into all new feeders (even soft insects can make Dragons bloated or make them regurge.
No matter what insect you feed your dragon it is as only healthy as the food you feed it. Make sure all dead bugs removed from insect colonies, fresh whole fruit and veggies and water should always be available.
I have fed hundreds of thousands of mealeorms, superworms, and every other insect avavailable to my large colony of dragons, and I have never had an impaction. Other breeders experience the same thing as I do. It is isolated and likely related to poor health, improper temperatures, too large of prey and a lack of healthy gut Flora.