The well thought-out Agile value via different approaches are "Focus, Courage, Openness, Commitment, and Respect."
A hybrid approach isn't always necessary for quality, but a well thought out and tailored one always is. The whole notion of "agility" is to follow the set of Agile principles that you have to stay flexible and choose the right approach each time you approach a project or even running an organization as a whole to maintain the core values. But sometimes that may mean doing something that seems less "Agile" from an academic perspective. The correct approach is always going to be the one that is tailor made for the project you're on. In cases where the life-expectancy of an app is measurable in decades, you simply must keep a set of long-range lenses on and take the extra time and steps necessary to plan it well even if it doesn't seem "agile." In other cases, being puristically Agile might be the exact fit.
Building a high performing team with complementary skills is crucial to Agile quality: Shortage of skills causes problems, no matter what approach is used. And agile approaches are allowed to pick and mix practices from all sources, where they are appropriate practices in the context. In the case that your system is poorly structured and "a very complicated, confusing, and hard to maintain codebase," the problem is that your teams don't have the skills (or possibly aren't allowed to apply them) to create a system that is well designed and easy to maintain. Complexity has built up, whether owing to shortage of skills or shortage of prioritization. If you don't have skills, or you are not allowed to use them is not Agile problem, it is an organizational problem, it is a management problem. What Agile does is to highlight the problem for all to see, agility means using what works and adapting to make it continue to improve, even it that means removing things that no longer work. There are times you have to introduce something that might make Agile "purists" cringe, even if it is just to facilitate learning a concept.
Business Value will always be an important consideration. Risk will sometimes be an important consideration. Opinions on priority change with time, so you ought to have something that allows ready re-prioritization whenever needed. Business people should know the business value and the risk from a business perspective. It might take some eliciting unless they are accustomed to evaluating risk and value. Technical people should be able to give you an initial idea on the cost and the technical risk, and on their capacity to adjust to the risk later if the feature doesn't get prioritized. Five Scrum values and most of other Agile approaches have similar values are "Focus, Courage, Openness, Commitment, and Respect."
Agile is both philosophy and methodology; mindset and framework, strategically, Agile means customer-centricity and quality; technically. Agile focuses on three Is: Iteration, Interaction, and Improvement. So the organizations and teams just need to experiment and learn; run and adjust; interact and improve; with the end business goals in mind, to achieve business result with high quality, customer satisfaction, and value creation.