... I'm guessing it would be over 2 grand to get the machining work done to a realsteel M4 to even fit a gearbox or something like that in it.
Not to mention that even that I'm pretty sure modifying a real firearm like that illegal.
You're basically talking about engineering a drop in kit for real-steel guns... Pointing real guns at other people is never a good idea, even if they're disabled.