My job history is similar to yours.
It think it’s important to point out that there are a lot of factors that can influence whether or not you can manage a 40 hours work week.
Private vs public sector
My brother is a postman. He gets overtime pay and I don’t. His union fights for him while I’m on my own. I’ve read somewhere that developers are the new factory workers of the 21st century and I totally agree with that.
Employee vs Consultant
It’s all about leverage. When you’re an employee and you’re not paid overtime, how are you suppose to punish management for their unrealistic expectations ? Yeah you have to stand your ground, learn to say no, manage your time effectively etc. But what if all of that is not enough ?
Lookup on google what happened at EA and other gaming companies when employees were forced to work basically 7 days a week with the occasional night off. You basically have no choice but to quit and that can be really stressful if you have a mortgage, kids etc and not enough savings.
Your role in the team
Do you deploy your team’s code at midnight so the employees who show up at 4am don’t have any issues ? Are you constantly trying to get out of meetings ? Are you a senior dev that fixes problems or are you a junior dev that relies on seniors for help and guidance ?
Your country’s laws
I live in Canada and when it comes to overtime, the laws are obsolete. 9am to 5pm is no longer the norm. We never really punch out after 5.
Big corporation, small business, startup all have different challenges.
Startups sometimes don’t have an HR department.
Is management committed to provide work-life balance ? Are they only concerned about the bottom line ? Sometimes that’s hard to figure out in the interview process.