Come to Google! No forced management track so you can code for as long as you want, no ageism (colleague just turned 60; I'm 40 myself), will probably let you support a family, great WLB :)
fine print: must leetcode for a year before entering. results are not guaranteed. along with the fact that you'll feel like an insignificant cog in a gargantuan machine
Give it a try :) I interviewed twice and was hired twice, at 30 and at 39. Don't believe the naysayers, the interviews are actually super reasonable! It's algorithmic, but not leetcode; it feels like "let's figure out this problem together in the whiteboard, colleague".
Having to reverse a binary tree or some other associated nonsense for a frontend UI role meant I turned the interview process at Google down. That and about 6 prospective hours of interviews for my application to then be sent to a "hiring committee" who ultimately decided if I was worthy enough of a job at Google, it just wasn't worth the hoop-jumping.
And also they can't interview at Google for another year after rejection. So failing the interview has multiple costs associated with it. It's better to prepare well and then appear for the interview.