54 cells of 50 v each on

It sounds unlikely, exactly how are these batteries wired up?

You can’t get a linear signal through an opto isolator without using op amps and a dual output isolator.

Measuring cells in seriese anbe doe with a flying capacitor circuit and relays.