I'd wait for the flies to start hatching to be sure - BSFL do die and you don't want to feed a dead and rotted inside lava to your pet.
My policy is no dead insects to my pets ( unless I killed them ) . NOT WORTH THE RISK.
What I do (when I feel energetic, is I separate the BSFL from the darker PUPEA , they are easy to pick apart as the are immobile , and hard shelled.
OR I if can hear the flies trying to escape then I deal with Black Soldier Flies .
They go into a separate tub with a lid and when the flies emerge I catch them ( is easy by hand ) and I crush their heads to make them less "flighty" , my skinks and beardies love the flies as treats.
Inevitably a few flies escape and end up hanging out near the lights and window - the resident G.Dudia geckos make them disappear in short order ( like the occasional rogue cricket ).
If I have a lot of flies hatching , more than 20 -30 , I'll catch as many of them as I can, squish their heads to slow them down and they go outside with any freshly dead cricket for the resident wild skinks , dragons ( jackies and eastern water dragons ) and frogs and I'm pretty sure the magpies are partial to them too especially when they are nesting and raising chicks.