Found better technique just before publishing old, but still good technique – can the old one still be published?
Publish T1. Later, when you have time to write a whole new paper, publish T2. Doing a comparative study between the two sounds like an excellent follow-up decision as well. I'm not sure why you classify T1 as a failure... it sounds like both work and one works better.

That said, yes, it is okay to publish "failure papers." Depending on the field it might be harder to get it approved by a journal because it's less sexy to find a negative result than to find a result. This causes a measurable bias in some fields and depending on the field can be a major problem, because failed research is just as important as successful research epistemically speaking.