When the fallout happens between Trump and Musk, Trump may find it difficult to get rid of him since he has handed so much power to Musk (via write access to government databases).
There will come a point where he literally won't be able to get rid of him once control of the law enforcement arm goes to Musk.
I don't think this is true. I think there are multiple avenues for which Musk could be prosecuted if Trump wants him gone. All he has to do is say the word and Musk will be in jail on the same day.