I don’t know about heat but Ultraviolet-C does kill viruses.
I am sure heat would work but it might have to be low enough to not cause damage to the fabric which might cause the need for extended time.
UV-C technology exists on a small scale that could hold a few face masks but I am sure a large cabinet version could work. Depending on the wattage it could take 5–20 minutes of light exposure. Light would have to come from all directions to expose all surfaces. Some of the small commercial units have a single lamp and reflective surfaces on all sides. These are used, among other things, as instrument sterilizers in manicure shops and come in the size of a microwave oven.
There are LED lamps that generate near zero heat and UV-C in the right wavelength that are very low power.
I saw some company had created a shipping container sized sterilizer that used some sort of peroxide vapor in the container. I assume that the peroxide would then have to evaporate before you used the mask.
If you use UV-C the mask would be ready to go as soon as the correct time had passed and you turned off the light.
The only danger is UV-C light can damage your eyes or potentially your skin for high wattage and long enough exposure. The box would have to be “light tight” and probably have an electrical interlock to turn off the light if the door was opened before a timer ran out.