No company will say thanks for wrecking your personal life and ending up burned out.
It is still perfectly possible to climb the career ladder without overtime and doing extra tasks for no extra pay etc.
Time is a persons most valuable asset and the companies know that. Do not waste it on repetitive monkey tasks which are the result of multiple product development failures covered up by incompetent managers. There is not much to learn in these places. These are for people with sub average ambitions, fair enough.
Your point with the hr would be funny if it weren't so sad and real. Anyone who was ever subject to such will immediately understand why concentration camps have happened. Never trust HR beyond rota planning and perhaps payroll. They are the ones posting these ridiculous developer job adverts, we have all seen them.
If you dont expect to stay till the end, then dont sign, or ask for a shorter cdd which can also be renewed at most one more time depening on the company, or concerted into a cdi
Ok so I don't officially leave, but I just stop turning up for work. What are they going to do, fire me? Ça marche, adieu...
In the worst case, you would risk getting a "faute grave" added into your police register ("casier judiciaire"). Your employer could also sue you for damages.
Best is always to find an agreement with your employer.
Thankfully my own manager (whom I was leaving) had my back and pointed out that since I was leaving for a permanent role (CDI) which my current employer had not yet offered to me in writing (though informally expected me to carry on), I could get around this.
I honestly don't know what they were expecting. How can you carry on working for a company against your will with the threat of being sued if you tried to leave, what sort of a working environment is that?