Power Metal Oxide Resistor - Maximum pulse voltage
The PO596 is quite small and is suitable for 1400 volts so maybe use 4 in series to give you the 5kV requirement. Clearly, the resistance for each has to drop to 55kohm or thereabouts. All four resistors should be nominally identical in value.

Without the relevant section of EN60664-1 spelled-out anyone reading this question is probably going to be "in the dark" but maybe you have an internet source?

The name of the spec is: -


  Insulation coordination for equipment within low-voltage systems.
  Principles, requirements and tests


Based on this I would say that your interpretation may be flawed - the 220k resistor in series with the opto is, presumably connected AC wire to AC wire (live to neutral) and this has no relevance as "insulation". It isn't an insulator.