The depth of the stack is not a very good metric for code quality.
The overarching problem is trying to reinvent the wheel because the management thinks we can do things better than the language designers.
The end result is a buggy and generally bad reimplementation of core libraries. ORM, math, dates, full text search. There's a half-baked custom version of everything.
Only noobs like myself years ago would go ahead and refactor a lot of code during work hours without a good reason.
However when you stumble through something and finally understand the idea behind it (good or bad) then it might be a good time to add a couple of tests.
And when you have a few tests that covers nearby code you can hopefully find the courage to make a few surgical cuts to remove the worst tumors. ;-)