is it legal to remove the guts out of an existing recessed panel . cover panel with a flanged j box. pipe over to new surface mounted panel in order to reuse existing wiring????
Sounds like you are using the old cabinet for a j box, or gutter. J boxes have requirements which are given in Article 370. I would look in part B. The general question is, is there enough room (volume) for the wire and splices. If it could in some way be considered a wireway, then Article 362 applies. This sounds like a residential service upgrade, but I could be wrong. I'm sure others will provide much greater insight than I.
Boxological Regards,
Doc