The flip side is that the project did succeed, this success brought a lot more money than originally expected to my firm, and I didn't get a fair bonus. Now I only work (serious) overtime if they agree to pay me beforehand, and I'm working on my startup(s) on the side.
Regardless though, something feels very wrong about working very hard on something that can provide a huge monetary gain for your superiors, with the very real risk that you might not get anything in return. I operate (and have always operated, due to the horror stories I've heard) the same way you seem to do now: Do nothing but what's expected of you for the company, and only do more than what you're paid for if you've got leverage to actually be compensated for the real effort that you put in.
Computer people are, by and large, way too weak in exerting their rights. Whenever I hear a story of a nerd getting screwed over in a negotiation or liquidity event, I think of a small, weak kid getting his lunch money taken by a bully and not having any power to do anything about it. We're grownups and we have a lot of tools at our disposal to push back against injustices like these. It's like Nassim Nicholas Taleb said - sometimes you just need to sue someone. It's a matter of respect.
With my current manager it took me some time to understand that his promises were written on water. Add to that a daughter, a mortgage and the crisis, and he probably felt it safe enough to screw me. I hope to prove him wrong soon enough ;)
There are a lot of detailed regulations, but among other things, _all_ work over 40 hours a week is overtime and needs to be compensated at least 40% higher than regular work. And working more than 200 hours of overtime a year is actually illegal.
In practice, however, most employees and employers in the software industry just ignore these rules and save up these extra hours on a "flex time account" where they can take it out as paid vacation later, or with some luck, be paid in cash.
If you actually took a case like this to court and demanded the 40% bonus on all overtime, you would probably win. But there seems to be a gentleman's agreement between industry participants that this would be a bad idea. I have no idea why this is the case - I just assume that it is because a lot of IT workers have doormat tendencies and have a hard time claiming their rights.