Solar and lunar eclipses -- how rare
TOTAL solar eclipses and TOTAL lunar eclipses are actually not that common in places outside of the solar system. For these TOTAL eclipses to occur, and I'm emphasizing total bc partial eclipses happen all the time, there needs to be the perfect distance so that an object perfectly covers the Sun.

In other words, you are correct - it is such a remarkable coincidence that this occurs in our Solar System. I'm not entirely sure about how many exoplanetary systems also experience this phenomenon, but I assume that it won't be a lot. I do know that it DOES HAPPEN in other places, but it just isn't common.

Just for a fun fact - the Moon is actually moving away from us, meaning that in a few million years, total solar eclipses won't be possible anymore - and we'll only see partial eclipses.

Hope that helps! :)