This question has been addressed by a few studies in the past decade. These studies ran climate models for planets with eccentric orbits. I'm aware of three scientific papers on the topic (I'm co-author of one): here, here and here.
The simple answer is: what matters first and foremost is the mean flux received by a planet over the course of its orbit. The orbit-averaged flux $F$ scales with the orbital eccentricity $e$ and semimajor axis a as $F\sim a^{-2} (1-e^2)^{-1/2}$. You need a big eccentricity for it to make a big difference on the climate (e.g., for an eccentricity of 0.5 the increase in orbit-averaged flux is just 15%, easily compensated by increasing the planet's semimajor axis by a smidge):
For a planet on an eccentric orbit, there is a short hot summer and a long cold winter. But most of the relevant climatic timescales are much longer than the orbital time so only the orbit-averaged flux matters. 188
This plot shows the orbit-averaged Flux (blue curve), the aphelion to perihlion ratio dmax/dmin (green curve), and the ratio of flux received at peri- vs apo (red curve).
FYI, I once wrote a blog post on exactly this subject: https://planetplanet.net/2014/10/06/real-life-sci-fi-worlds-1-the-eccentric-earth/ and there are plenty of interesting details. My favorite was that we imagined (and performed climate simulations of) a planet on a very stretched-out orbit that was also tilted on its spin axis. The planet ended up being a global iceball except at the point that received the strongest heat pulse from the Sun -- at the South pole in this case, which thawed for about a month per year. Here is an illustration (white = frozen over, blue = just above freezing).
FYI there is another interesting situation in which a planet's orbital eccentricity changes in time due to gravitational interactions with other planets in the system. If you're interested see here: https://planetplanet.net/2014/10/08/real-life-sci-fi-worlds-3-the-oscillating-earth/
On that note, in a simulation of rocky planet formation I once produced a pair of planets that straddled the habitable zone but that exchanged eccentricity such that they took turns having excursions outside the habitable zone. FYI, in this image time 2 is about 20,000 years after time 1 (details on that simulation here or here). 188