Can electronics survive in cooking oil?
Instead of guessing, read the datasheet.  Silicon stops being a semiconductor at around 150&deg;C, so that is a upper limit.  However, it still has to do useful stuff, so the practical limit is lower.  70&deg;C is a common "consumer" grade upper limit.  "Industrial" grade devices will go higher, usually around 120&deg;C.  Military grade can go higher.  Of course all this comes at a cost premium.

There are other electronic devices than just silicon semiconductors, and some of them can be significantly less tolerant.  Look at the datasheet for a electrolytic cap, for example.  Not only will you probably see a low max operating temperature, but you will notice that lifetime is severely degraded at that temperature.

As for the oil, as long as it is water free and insulating, most electronics will probably be OK with it, at least for a while. Some seals on electrolytic capacitors are known to swell up and become useless in mineral oil, so cooking oil probably isn't much better.  I'd worry about the cooking oil degrading into other chemicals over time or due to bacterial action, and those chemicals causing problems, like shorts, corrosion, electrolysis, etc.