Depends on the material. ABS would be a decent material for this application - as long as you have a decent enough setup to scrub / clean the air in the chamber / room.
PLA would have a hard time in that position, PETG might be OK, Nylon may creep after too many heat cycles. Depending on how hot those parts get this is.