Besides cost and complexity, I would think about installing capacitor banks on medium voltage side when I would have many transformers (or one transformer with substantial power) and measuring is on the medium voltage side.
When resonance is concerned, there are on the market capacitor banks with anti-resonant and filtering abilities.