Hi,
I personally don't think it is a good idea...
But let's try to improve it.....
Safety first. You need to be very careful with this high voltage. You should be very experienced with high voltage and with the safety regulations for those high voltages. Especially if you build it for other people to use it.
Consider redundant safety construction.
Now to the problem.
Capacitors are not ideal. They may have leakage current causing errors.
And a mayor problem will be the voltage dependency of the dielectric material.
I don't think that ceramic capacitors are useful here. Use foil capacitors. If you find polystyrene, then try this.
Also in this range of voltage the ionisation of the air may generate additional error current. It depends on voltage, geometry, air pressure, humidity and temperature, so it about impossible to compensate. Also pcb material and other isolating material may influence accuracy. Maybe the use of teflon (PTFE) ist an improvement.
Be aware that the precision depends on waveform. You can calibrate for a perfect sine, but if waveform deviates, then the voltage reading also deviates.
********
Where do you see the benefit in using capacitors instead of high voltage resistors?
For sure here also you need a careful design.
The power dissipation in a 100M resistor is 4W. For redundancy reasons I recommend to use 10 x 10M resistors in series. Consider potting in elastic potting material.
Each resistor should be rated with 1W and a voltage of 5kV continous AC. Please carefully read the datasheet often the 'rated' voltage is a 'test voltage' with a limit to 1 minute.
Again: take care of the safety regulations for this high voltage.
If you consider potting of the capacitors, then you should know that the potting material also acts as dielectric material, increasing the overall capacitance. Especially two component potting material have has large temperature coefficient in dielectric constant. Choose the material carefully.
Klaus