I'm not sure the economics works on something like that. Once you buy all the equipment, employees, and commercial buildings, it simply isn't going to be profitable to only run your factory 10% of the time (How often does solar power go wasted? Not actually sure).
Maybe it would work if this was only one step in a larger processes. When energy is free, use it to make a ton of this crude oil and then process the crude with less energy intensive methods when electricity is expensive.
If this is a thermal process, then intermittent cheap energy can be stored in thermal masses (firebrick, for example) much more cheaply than in batteries, and the heat used later. That way that later stage can be kept operating more continuously.