It’s actually quite easy to write your own shaders (outside of the editor) and to use them in UE, but in general these shaders cannot be used together with the material editor or to replace the default shading model in UE. I’ve used custom shaders mostly for compute tasks and for some custom rendering to texture effects (where you need to manually specify all inputs, etc…).
One exception are custom vertex shaders that can, at least to some degree, interact with the material editor if they are written using the vertexfactory framework…