I’m no expert but first thing that come to my mind is (and it would surely work) is to modify UBT source code to suit your needs.
another easier way is to modify code how UBT generates project files, ie. adding prebuild related code to UBT. this would affect all future projects.
EDIT:
There is a way to make prebuild event, you need to define it in .target.cs file
PreBuildSteps (List<String>)
Specifies a list of steps which should
be executed before this target is
built, in the context of the host
platform’s shell. The following
variables will be expanded before
execution: $(EngineDir),
$(ProjectDir), $(TargetName),
$(TargetPlatform),
$(TargetConfiguration), $(TargetType),
$(ProjectFile).
Reference: