Not sure if the code is the best place to track technical debt. Whenever a compromise made that results in tech debt, a ticket should be created in the issue tracker. That way it's easier to get an overview about the project's health.
in my experience no one doubts that the debt exists, rather people just don't see the same value in addressing it, and aren't easily convinced by arguments they've already been ignoring for years or decades
i'm one of two feature devs on a team of four. over three years the team wrote a few hundred tickets for debt. when the client was acquired and we finally got space to address debt, non-technical stakeholders asked us to nuke the list and write a much shorter one that we can prioritize by complexity and customer impact. the debt is now being addressed in the same way as new build, because that's how we treated it; much like new build, it won't be completed to our satisfaction
in my experience the only thing that works, short of a major incident that devs forecasted and offered to prevent, is buying time--either to just write better code up front, or to use on _undirected_ remediation