Yes it should be possible to get support for that but I cannot say when it can be expected to happen. I have been talking to some programmers about it recently already.
The part of the engine mostly responsible for this is a file called HLSLMaterialTranslator as well as MaterialExpressionCustom.h. Mostly in the HLSLmaterialtranslator is a block where the ‘code’ statement gets evaluated and checked for the word ‘return’. You could probably add a quick hacky string replacement function somewhere in there to inject a custom input expression. Or maybe add some option handling for fragments like you talked about but the implementation details beyond that are beyond my programming skills. At least when it comes to doing things the ‘right’ way. It’s usually much easier to get something simpler that isn’t fully robust working though, which is why it can be hard for every feature to be officially supported.