The caret is a pseudo-element on the span, so it follows the text automatically. Deleting is twice as fast as typing, which feels natural.
Phrases live in a data-words attribute as JSON, so you can reuse the script anywhere without touching it. With reduced motion on, it still types (text appearing in place isn't movement), but the caret stops blinking.