Solution to detect bad vias in production process
There are a number of reasons for cracked vias and  virtually all of them are caused, to a greater or lesser degree, by CTE issues.

Looking at this datasheet (a very commonly used material in the high reliability sector) we can see that below Tg the CTE in the Z axis is typically 45 ppm / K (*) but in the X and Y axes it is typically 13 to 14 ppm / K.

Above Tg (which it will definitely encounter in reflow) the Z axis CTE rises to 230 ppm / K, a rather large increase.

The time above Tg is therefore critical for via reliability; the higher the Tg of the material, the lower the risk of cracked vias (because the time above Tg is minimised); a lower Tg material may be suitable if there are no dense via fields. You can find a description of standard materials here.

Rigiflex assemblies also have their own unique issues particularly if a coverlay is used. These materials are often used to protect the flex section of a PCB, but the Tg of this material is only about 40C (ask me how I know) so if a via goes through the coverlay then even under moderate temperature cycling, vias can be destroyed (they get spread sideways within the coverlay).

Putting vias through a coverlay is asking for trouble.

If you have a high density (even locally) of vias, then you should consider using a high Tg laminate material.

Testing for open circuits at an elevated temperature is likely to find the majority of via problems; I would start out at perhaps 50C and let the unit soak.

[Update to address X-Ray]

X-Ray is both expensive and time consuming and most (if not all) PCB laminate vendors do not have a machine (if they do their own assembly as well, they may have one); even then, X-Ray will be of limited (probably very low) value in trying to find a needle in a haystack (if you know where the broken vias tend to be it may help a little).

In a dense via field, even X-Ray at an angle will not be able to 'see' within the field effectively, if at all, so X-Ray really won't solve the problem for you.

X-Ray equipment also requires proper training and safety procedures.

(*) K = Kelvin