first post here.
I have been keeping whiteworms for a long time. I use coconut coir that they sell for reptiles. It comes in bricks that expand when water is added and has zero ferts and is rather benign so if some goes in your tank it isn't a big deal. I mix in some dry, powdered egg shells to the coir to buffer pH. Low pH from worm waste will crash your worm culture.
My best worm production comes from feeding a high quality dry cat food (Orijen). But worms are worms and they have a big digestive track so some of what you feed ends up in the fish.
I rotate the cat food with spirulina wafers and color sticks. Hypothetically this gives a more balanced, varied diet to the worms and, hence, the fish. When I feed the color sticks the worms take on a reddish tint.
HTH