You could definitely use the same approach for any one irrational number you were interested in. With a tuple of integers you could track a handful of irrationals. If you need more than that you would probably be better served by something like the cyclotomic package.
The reason it is hard-coded to pi is twofold. First, that's the one I need to track, because it appears in conversion factors between units of angle. Second, because pi appears in the Floating instance, which makes it notationally more convenient to have the type specialized for pi.
If you have a use case for the extra generality, I could see an approach where its parametrized by a Symbol. It would still be convenient to have the Floating instance specialized for the type that tracks pi, but that would be achievable.