If Richmond is captured early enough that there is still a place to send it to, and there is enough time to do it, Tredegar could be dismantled, shipped to another city, and reassembled. Confederate factories in Nashville and other cities captured early in the war were treated the same way, mostly ending up in Atlanta or Macon, Georgia. For that matter, most of the Confederate production facilities in Richmond apart from Tredegar (and there were several) were moved there from other locations.
Yes, there would be a time period while the moving and reassembling was being carried out when Confederate production would feel the supply shock. But it wouldn't be permanent.
The reason this wasn't done in OTL is by the time it became apparent that Richmond was going to eventually fall, Atlanta had already fallen and there just really wasn't anyplace left to ship the Tredegar facilities, and most of the rail lines needed to do it were either smoking ruins or in enemy hands.