I'm not sure where there's a recommendation for the Scrum Master to not work with more than two teams. The Scrum Guide doesn't place any such restriction on the Scrum Master. The Nexus Guide states that the Nexus Integration Team's Scrum Master may be a Scrum Master for "one or more of the Scrum Teams in that Nexus". Under LeSS, a Scrum Master can serve up to three teams. In my personal experience, a Scrum Master can serve up to four teams, depending on the expected stance (or level/type of involvement) and the maturity of the teams.
Looking more broadly at the Scrum Master role, I don't think that the Scrum Master is a "career path" or even a job title. It's a role on a team that is using the Scrum framework. I would consider the career path to be more along the lines of "agile coaching". The Agile Coaching Competency Framework is probably a good place to start, and there are plenty of opportunities for people to specialize in different aspects of agile coaching.
Scrum Master is primarily a team-level role, but it does reach outwards into the organization that the team is a part of and to stakeholders of the team's work. There are also different problems in working at scale, such as multiple teams working on a single product, an organization supporting multiple products, and embracing agility outside of the product development organization.
In addition, there are frameworks other than Scrum. Closest to Scrum are the scaled Scrum frameworks like Nexus, Scrum@Scale, and LeSS. At an organizational level, there are frameworks like Disciplined Agile and SAFe. There are also alternative agile methods like DSDM, Crystal, Extreme Programming, and Kanban, some of which pair nicely with the Scrum framework.
From a Scrum Master role on a team, there are plenty of places to go. It just depends on what you want to do and what skills you want to maintain or develop.