It is theoretically possible to get stuck while leveling in SWTOR: If you ONLY do your class quests, at some point you will be unable to beat some boss mob needed to proceed further. But of course in practice that rarely happens, most people do a lot of side-quests and keep their level up sufficiently to deal with the main quest line.
But the theoretical exercise on how you could get stuck while leveling also tells us how you would get unstuck, and points us towards a fundamental advantage of leveling content: You can't get permanently stuck unless you reach the level cap. Even if you play really badly and can't beat some harder main quest encounter, you always have the option to go back to easier content, gain some more levels and/or gear, and thus make any hard encounter easier. Leveling content principally is one of variable difficulty, and how easy or hard an encounter is depends mainly on how high in level you are while trying it. Thus by judiciously skipping side-quests or doing bonus quest series, you can always adjust the difficulty of the leveling content to be in the optimum fun range, challenging without being either frustrating nor trivial.
That is a huge advantage over the endgame content, which is designed to be fixed difficulty (even if that fixed difficulty is then later diluted by nerfs and welfare epics). In a classic raid endgame, if your guild can't beat a raid encounter, there is nothing to do but try and try again, up to 400 wipes before success having been reported. If you need to beat an encounter to get the next better gear, but can't beat the encounter without better gear, you are stuck. Fixed difficulty by definition is only in the optimum fun range for a small, fixed part of the population. Making raids easier doesn't change that, it only changes for which part of the population the new difficulty is now fun. And if you open up alternative ways to gain epic gear which is as good as the one you could get by raiding, you remove the motivation for raiding at the same time as you remove the obstacle preventing people from advancing.
Now that with Star Wars: The Old Republic we entered a new age of more story-centric MMORPGs, there are good arguments for reversing the previous trend that made leveling shorter and shorter. Story-based role-playing works better while leveling, because "run 100 heroics" or "repeat that raid dungeon for 3 months" are hard to integrate into any sensible story-telling. If your average player plays for 20 hours per week, and you want him to subscribe to your game for a year, why not offer him 1,000 hours worth of story-based leveling game?
The endgame in a MMORPG like World of Warcraft is often perceived as "the real game", with the leveling game being an obstacle to overcome to reach the endgame; a perception which led to shortening time to level cap over the last decade from 2,000 hours in Everquest to 200 hours in modern WoW. But that perception is based on people wanting to play together, and World of Warcraft being deficient in offering multi-player content before the level cap. It is a vicious cycle of leveling being too easy to solo, which makes people solo more, and then makes them want to rush through the solo content to finally get to the massively multiplayer part. If you think that "people can't play together before the level cap", then the rush to the cap is understandable. But that is not an inherent feature of level-based MMORPGs, it is just the way WoW works. Many people have a limited experience of games working differently and end up having difficulties imagining a different system. But those different systems exist, and their constituent parts have already been tried with success in previous games.
A game with a long and challenging leveling game would need some features that World of Warcraft doesn't possess: Better incentives for grouping while leveling in the form of significant group xp bonuses, and a sidekick/mentoring feature enabling people to temporary adjust their level to play with their friends without losing out on all rewards. That isn't to say that soloing should be removed, it should just not be the most efficient form of leveling up. As forming a group has its barriers to entry, the "time lost" for forming the group has to be compensated by better rewards when grouping. And if the leveling part of the game is longer, that can easily be achieved by a simple group xp bonus which makes xp gained per hour in a group more than those gained while soloing. In World of Warcraft you'd earn less xp per hour and do less quests per hour if you'd do them in a group than if you'd solo, a bad design which pushes people into soloing even if they aren't lone wolfs by nature. Games which do a better job to encourage grouping end up having a better community, leading to people making more new friends, having more fun, and ultimately staying subscribed longer. SWTOR even shows how to reward players for doing quest dialogues in groups instead of solo.
The MMORPG genre is one of constant evolution, of "standing on the shoulders of giants". SWTOR advanced the genre by such a giant step through its "fourth pillar" of story-telling, with cutscenes and voice-acting, and with a main quest line individual to the character. Future MMORPGs which try to get people to quest with a 512-character dry quest text to read will feel dated. And the more people enjoy playing through the story, the less they will want to abbreviate the experience and get to a "story over" endgame. I can well imagine a future game marketing itself as having twice as much story through twice as long leveling as SWTOR has. And that is fine by me. The solution for people who hate leveling is a different game, one which simply doesn't have any leveling at all, and just starts with raiding right away.