Topological phase transition revealed by electron waiting times