After a long stretch of I just ask codex to: Audit the code base and event changes and describe the data model and all related and possibly overlapping functions.
Plan a new redesign that is simpler, has less code, more reuse and cleaner design,
Execute the refactor Review the code and asses new code and reaudit
… repeat
You can queue these up in codex and it will just go about its way reducing your tech debt way faster than an engineer could.