Try to keep everything dry. Don't let the egg crate get wet. Remove uneaten food. Clean out frass. Even doing all the above, you need good ventilation and heat to keep it from getting too damp.
If you want a long-lived feeder, you should check into dubia roaches. I started off with crickets...