Separate the pupa from about 50-100 mealworms as they change move them into a new setup with a couple inches of wheat germ and whatever gutload and a water source, vegetables and/or water crystals.

After they change to beetles, leave them a month or so then move the beetles to another new tub setup. I've found the key is keeping the different stages separate so they don't cannibalize. I now have a shoebox tub just teeming with mealworms and another one full of beetles that will be thousands of new mealworms in another month or so.

I get a lot of deformed beetles that I purge out once a week or so as they appear, the tarantulas love the newly molted beetles.