If someone has access to the source code, there isn't much that can be done for prevention. I suppose reactive measures, such as attaching a hidden GPS tracker like the ones in expensive rental cars, could detect violations.
Also, removing him from the the tech lead position would have helped prevent further incidents.
Then something else should. Imagine one guy, gone nuts, changing the code on millions of vehicles in one shot.