Thanks Andrew, this works.
It can also be added to GetMaterialMaskInputRaw in MaterialTemplate.usf to make this global. This means less control ofc. Making a material function is probably the best way.
For people with this issue, you can check for MSAA with a custom material node using View.NumSceneColorMSAASamples
I also noticed that it seems to work pretty well with MSAA 4x now without any changes. This is also mentioned in the CustomAlpha2Coverage function in BasePassPixelShader.usf . It says todo: support non 4xMSAA as well. So it seems something is moving forward(no pun) there.
Best Regards