First consider what happens when the capacitor becomes a short. I am thinking of smoke, fire, shock, blown fuse, etc. A single fault may not result in danger for most consumer equipment.
Though you have a varistor at the input, I still would use an X3 class capacitor rated for your operating mains voltage. You don't need X1 or X2 because when designed well, the varistor will limit the impulse voltage. The film type capacitors have a "self healing" property. If faillure would lead to injury (for example electrical shock), you should use an Y capacitor, or a series circuit of 2, X capacitors to meet safety regulations.
I am not aware of ceramic X capacitors with that large values that you can use at 230Vac. If you find some, make sure that they have qualifications to meet electrical safety requirements, when faillure may lead to danger.
Off topic: Varistors also need safety considerations, as thay age over time and may overheat, explode, etc. At least read some safety application note related to varistors.