We have a somewhat unique service set up at a bank/post office. 500kcmil fed from utility pole mount xfmrs to trough and two meters on exterior wall. 500's go through trough and feed a 400a 3p 4 wire meter, than into buiding to disconnecting means. 3/0 is tapped off of 500's in trough to feed a 200a 3P 4w meter than travels inside to disconnecting means.

I would like to pull 500's out of trough (line side of meters) repace trough with 24x20 nema3 box. splice onto the 500s and go to my new 400a disconnect, which will than feed transfer switch. Than from transfer switch, come back to nema 3 box and feed meters. Is this legal?