Exactly. There are millions of oil-filled transformers in service, with an excellent record. And most ham radio operators have used a "cantenna", which is a big 50 ohm resistor in a paint bucket full of oil, used as a dummy antenna.

I wouldn't have used vegetable oil for this application, though, because it will quickly go rancid exposed to air like that. Straight mineral oil would be better (though the druggist might give you a funny look when you buy a couple gallons of the stuff!).

I would be interested in the long-term reliability of a setup like this. Most plug-in connectors are NOT designed for oil immersion, so there might be intermittent contact problems in a few months/years. The cooling oil might tend to leach the plasticizers out of plastic parts, perhaps causing the plastic to disintegrate or become brittle, or making the oil itself conductive.