Been down this exact road with printed airframes, so here's what worked for me. Don't rely on friction fit alone in a printed tube, especially ABS. The layer lines let the motor walk forward under thrust and then spit out the back on the ejection charge. Ask me how I know. What I do now is glue a thrust ring inside the tube, just a short length of smaller tube or a printed ring set so the nozzle end sits flush, then retain the motor at the aft end. A simple printed hook or clip works fine, but honestly a couple of turns of masking tape around the base of the motor is the old school method and it never fails. The tape shears on ejection and the motor drops out like it should.
Your cap idea is fine as long as it's mounted to the airframe, not the motor. If it's fixed to the tube with a bit of glue or screwed in, it can't fall inside and block the chute. Just leave a small vent hole or cutout so you can push the spent casing out at the field.