I propose using a three-phase meter component and then an integrator at its output. The output of the integrator would be the total energy in Ws, so then you can just scale it to kWh.