The implication here is that if only you had enough time you wouldn't have any tech debt. I don't think that's true.
Some of the tech debt is due to not having enough knowledge about the future of your system; what it needs to do, how it'll be used, etc. You have to make a decision about the tech now and sometimes that decision turns out to be wrong, or at least incomplete, which leaves you with some debt that will need paid off some time.
I also believe some tech debt is unavoidable due to churn from outside of the system. Best practises for a given part of an app aren't fixed (eg React class components shifting to functional components), so sometimes something that was once good can turn into debt over time with no input from you.
The term "tech debt" means deliberate choices to compromise the system in a controlled way, to achieve a purpose. E.g. speed to market.
If it's not that, then it's not tech debt.
That's true, which is why things can become debt if you fail to maintain them, upgrade them, change them when the customer's requirements change etc. By choosing not to maintain code and do other things instead you're allowing parts of the system to decay. That is a source of tech debt (arguably the most common IMO).
It's possible the people working at the time were not conscious of the trade-offs they were making. But it still happened and that's how it came to be.
> if I inherit the code base of a bad programmer on my job
It sucks, but it's almost guaranteed to be the case, to some degree. Think from the company perspective. You're thinking too much from your personal perspective, which is kind of irrelevant to the company. You're not using the term just for you.
I do, rest assured, part of this is my job description. I'm just bumping over the assertion that a deliberate trade-off is a prerequisite for technical debt. It's too specific a reason, and like saying your expenses are higher than your earnings, that's why you are in debt. But in reality, there are many more ways to end up in debt, spending more than you earn is just one possible cause.
If you identify technical debt, either hypothetical or existing, the term is an option to explain this to your superiors in a way they might understand. They'll know that they need to do regular small investments to pay it off, or chose an alternative option to avoid it. But that's all there is to it.
What are some others that don’t trivially collapse into exactly that?
Likewise, for technical debt: a dependency you relied upon is not maintained anymore. There is an exploit found, or regulation changes, and you realize you used the forbidden pattern everywhere.
Basically: earnings minus expenses are the operating result. Concious decisions to accrue technical dept would be the equivalent. But there are costs directly affecting equity as well, which can still result in debt.
More often it's just a sign of a new company not knowing what they are doing and making unforced errors as a result, rather than a conscious debt/investment transaction.
Technical debt isn't inherently bad. Otherwise it would be called "techinical loss".
The problem though is that in the financial world there are rules and often laws about how much debt is acceptable and a bank will generally refuse to let you get into dangerous levels of debt whereas there are no such rules concerning technical debt so a company can keep piling it on until it eventually causes a collapse.