Cockroaches do not eat electronics but cockroaches do get into electronics and ruin them.
When cockroaches get into electronics they can short out the electronics circuit boards as they crawl across the circuit boards.
The cockroaches like the warmth and hiding place of the electronics.
You can open the electronics to get rid of the roaches but sometimes the roaches will ruin the electronics sooner than you can get rid of them.
Cockroaches love the inside of electronics to hide because of the warmth they put out and because they provide a great hiding place.
I've had roaches before when I lived in an apartment and they got into my Laptop computer and TV and ruined them both.
The laptop computer was only a few years old and the TV was only 1 year old.
Suddenly they just would not turn on and so I took them apart and found roaches on the circuit boards that caused a short in the circuit boards which ruined the electronics.
I've also had roaches get into a microwave and cause issues with the touch pad.
I did all I could to get rid of the roaches and even fumigated the apartment but still I had issues with roaches because a neighbor in the apartment next door to me had roaches.
You can use dawn dish soap to kill roaches or get some Borax and even roach motels or some of that Raid Roach Killer.