There is no locking him up. Trump would just pardon him. The only solution to this is of a more permanent kind administered by one of the alphabet agencies whose agents he is going to get killed.
There is another solution. When they call in the military, and they will, those people swore an oath to the constitution and are required to refuse an illegal order.