In order to replace a breaker one needs to turn off all branch circuit breakers and the main circuit breakers. You should check for voltage on adjacent breakers and never assume they have been turned off. A certified electrician can help remove or replace main breakers and disconnect a wire safely from the faulty breaker. They can recheck it when it is replaced for any other malfunctioning equipment, and replace those if needed too.
In addition to protection against electric shock, electrical installations should be designed so that there will not be any parts that will overheat. The electronic components and their plastic or rubber insulations themselves have a maximum temperature. If that temperature is exceeded then that component may fail and cause a short circuit. Breakers if maintained will help catch that.
Electrical cables and equipment are not 100% efficient either and should be reviewed. For every kilowatt of power passing through there will be a few watts of heat dissipated in the cable due to the resistance in the copper (or other) conductors and the losses in electronic components. This heat will cause the equipment to heat up. How much it heats up depends on how fast the heat is conducted away from the cable or the equipment.