Two-BFS is fast and simple. You do not need to overthink it: run BFS twice and return the distance.
The first BFS can start from any node. It guarantees finding a diameter endpoint. The second BFS from that endpoint finds the other end and computes the diameter.
This pattern appears in many tree problems. When you need extremal paths in trees, consider whether two traversals from endpoints can solve it. The technique generalizes beyond diameter to finding tree centers and computing all-pairs farthest distances.