No.
Is there a part in the code that I can disable?
Customers want to edit the device name but they should not touch the id number.
I cannot tell you exactly place where it needs to be changed in the code, but of course it's possible to customize the behavior in the code if you want.
In Traccar, when users are authorized to edit the device, they can also change the id number. Is there a setting so that users can only change the device name but not the id number?