How to make the most of a currently unfulfilling post-doc experience
Do I have a future or am I looking at a premature "pink slip"?


This is unlikely, especially in France. The financial savings from firing a one year post doc is pretty small compared to the hassle and bad blood that will result from doing it. 


  Although I am in a teaching track from 2015, I feel that this research experience will only enhance my teaching capabilities.


Is this really your goal of the post doc? It is not clear to me how a year spent disentangling spaghetti code is going to enhance your teaching capabilities. Most engineers do not take up a non-teaching post docs to enhance their teaching. I am not sure that most post docs would spend a year disentangling spaghetti code with supervisors hovering over their shoulders. Are you sure that an E2 is really the equivalent of a post doc? It is probably worth talking to your supervisor, hopefully again, to make sure you are both on the same page.

Realizing that you are unhappy with the current state of affairs does not really help you to change things. I think grad students and post docs sometimes have unfulfilling experiences because they do not know what they want. You need to figure out what it is you want to get out of the post doc and then figure out a way to work towards that goal. Often once you know what you want the road to obtaining that goal becomes clear.