The word of wisdom doesn’t say no coffee or tea. It says hot drink that the church says it means coffee or tea.
the interpretation could change to hot drink meaning hard alcohol like whiskey which is hot to the taste.
Whiskey was home remedy for swollen gums as a kid.