Text this: Optimal rates of estimation for multi-reference alignment