When to use slots instead of barriers in high voltage design?
One of the risks with attaching barriers to a pcb is that they aren't consistently attached ("cemented" is the UL term) to the board with variation in effectiveness both along their length, and from part to part in production, leading to the possibility that there's a small gap or wormhole under the barrier - so you then have to look at the creepage along that path. For very high voltage systems, it's common to move to a molded insulator with integral ribs, and the conductors are stampings that can be insert molded as part of the molding - or attached by screws or rivets. Obviously, adding slots to a pcb is more cost effective than (carefully) adding a barrier, since it's just part of the milling of the board that is undergoes regardless.

The standards, like UL840, are often insufficient when it comes to very high voltage design, as other factors become important. There is a risk of corona discharge  that is especially bad if there are sharp points e.g. through hole soldered lead ends or angles in the tracks, and the presence of the high voltages tend to attract dust that will over time compromise the tracking resistance of the surface, so air gaps tend to be better than barriers for this. If the device is used in locations where air pressure is reduced Paschen's law applies, this is relevant in aerospace applicaitons.

The HV circuits I worked on (10-15kV) were always encapsulated to avoid the risk of reduction of contamination reducing the tracking resistance, once this is done you then only have to worry about the breakdown of the materials involved. Asphalts were used for the large assemblies, since this was more cost-effective than the siicones or epoxies used on smaller units.

TLDR - airgaps are practically better than barriers, but once you get to multi-kV applications, encapsulation is preferred.