TL;DR: got here first | overworks | never ever does anything that could possibly be construed as challenging authority, such as having original ideas in front of someone ranked higher than you, or trying to help create some semblance of process.
Being absurdly incompetent at writing maintainable code that had serious, consequential, misunderstandings of the material needed to implement it? That's fine.
it's a feature, not a bug, to do just good enough a job to rush exec misunderstandings into prod, as long as anything wrong with it can be dissembled verbally, unless someone else wants to dig into the code.
This would have sounded horribly cynical and bitter and loser-speak when I was younger. Now that I saw it first hand, it clarified for me why people do startups and turnover is high, given it was a $300K/year job if you just show up 20 hours a week, and 40 hours a week for a month or two a year.
Younger me: lesson here is either care, and do a startup, or don't care and do the family and skiing or whatever.
Your plan of "I should go bank money for a few years so I can leave and do my own place safely" panned out great.
Your plan of "wow...standards are this low? People will see it and care, certainly if you're doing extremely impactful work" was completely wrong.