It depends a bit on the plastic and the oil.
There are many different types of plastic - polyethylene, polypropylene, ABS and so on.
Many of these use additives called plasticisers to make them a bit softer and more pliable.
Mineral oils (and synthetic oils) can dissolve the plasticisers and also some low-density plastics.
WHat I suspect is ging on is that over time, the oil has leached plasticisers out of the plastic and degraded the materials to the point where the plastic gave way.
It's a very slow, gradual process, so the specific weather or temperature on the day of the failure is not that relevsnt - though he process will speed up at higher temperatures.
Probably, if you can recover the offending bottle, you'll find it is more brittle than the top of the bottle, for example.
Hope it helps