Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
It is called "potting." From the looks of the scrape marks, it looks like a hard substance, rather than rubbery. It could be a low-temperature thermal setting compound but is more likely a catalyzed plastic, like epoxy but not necessarily epoxy.
In any event the chances of finding a solvent to dissolve that mass without damaging the electronics are slim. You could try dissolving a chip in acetone, methyl ethyl ketone (MEK), or chloroform/methylene dichloride.
Most likely, you will need to remove most of the solid by careful chipping and grinding. Then, clean up with a solvent or heat. Many epoxies become plastic at 130° to 145°C. Obviously, the box it is in will be a hindrance, so if it can be sacrificed, I would saw through the sides and peel it away. If you can get it an X-ray, that will help.
How valuable is it and is it worth all that work? If it contains an MCU, then getting the potting compound off will not be the end of your problem.
There is another way. It's used in laboratories for chip manufacturers. It's called "Reactive Ion Etching". It involves putting the device in a chamber and creating a high vacuum. Then introduce a bit of CH4 or some other gas. This then is bombarded with 100 to 200 watts of RF energy and it basically bombards the organic materials with high energy ions and they vaporize and are sucked away in the vacuum. It does cost tens of thousands of dollars though.
You can also, in theory, use nitric acid. Potential problem with destroying all organic compounds is the PCB is probably organic as are the packages for most transistors, IC's, etc,
EDIT: Oh, BTW, the process you describe is very similar to what we called electrochemical ionization (CI) is mass spectrometry may years ago (https://en.wikipedia.org/wiki/Chemical_ionization). Much better methods are available today such as MALDI.