Start with the power supply. Open the case and first look for any bare wires; especially bare wires close to the case. Vacuum out any dust and wipe dirt off any surfaces that you can get to. Replace bare wires or splice in better insulated wire. Clean out any corrosion. Clean all terminals and sockets. Others can suggest additional things to look for. I have not worked with electronics for a long time.
After the power supply, look at the enlarger head.
Then do the same with any item that causes the problem when attached.