When did it become acceptable to say two times, other than for the two times table? It’s twice, isn’t it? It’s twice, isn’t it?
This is a stylistic rule, not a rule of the English language. It’s good writing advice, but violating it isn’t “wrong” it’s just less elegant.
Neither is really correct because “texted” is a word that has been made up since the introduction of text messaging. But “I text him” is not grammatically correct either.
The best way to phrase it is, “I sent him a text message yesterday.”
Ultimately, you cannot “text” or “have texted” someone because text is a noun, not a verb.