Come to think of it, this has been true of most companies I've worked at. They talk a good game about best practices, agile, tooling, training, whatever... but when push comes to shove they'd rather have 3 more stories than honor previous commitments to regular tech debt stories, training, or even 40h weeks. They often can't even "waterfall" 2w of work without changing scope or priorities mid-sprint, and get mad when you bring it up/try to improve the system.
I'm tired of the same promises, but have also enabled this behavior-- I don't feel like I can say no. At my next company I'd like to gain their trust, but also set expectations and boundaries up front so I can have a life outside of work. I'd also like to push back against overtime or using my own time to brush up on some tech that they need because they were unable to plan properly (without sounding like a know-it-all). I'd like a two-way street.
*How can I achieve this while still gaining trust?* Are there good questions to ask or flags to look for in interviews?
On a related note: I've heard govt jobs are a good place to have a 9-5 and a life outside of work, but worry about outdated tech draining my energy (I'd be happy to have the time for hobby projects, but can lack the energy if work is hours and hours of mind-numbing stuff).
Well the truth is you can't say no without it harming your position at the company. Even if it just means they go lay all of those issues on a team member, whatever person steps up to do what they ask is going to get ahead of you.
That's fine if you don't care about getting ahead.
I think the only way to really enforce these sorts of boundaries with a company is to find one that respects those boundaries before you start there. During your interview ask questions about their overtime policy, how much overtime their devs have done in the last couple of sprints, how often overtime is expected in order to meet deadlines, how is overtime compensated, etc. Be as specific and probing as possible about how they actually support work-life balance.
Slightly related to your frustration of "company says one thing and does another", check out this thread (and definitely read the article) about cargo cult companies https://news.ycombinator.com/item?id=26016890