Confidence is also quite important IMHO. It's easy to start doubting your ability when you have nobody else to compare to. If you have a bad day (as everyone does from time to time) and end up getting nothing done, you need to be OK with that. If you run and hide, it can pile up on you.
One thing you might try is to convince your current employer to try doing 1 day a week remote. This will let you get your feet wet without a lot of risk. If you have problems, you're back at the office the next day. My current employer did that and it worked so well that most people are free to work in the office or not as they choose from day to day. There are many people who now work permanently remotely as well.
Whether you are can be a good fit or no depends on how frequently you need to ask your teammates a question.
If you need to do that say once a day, I would say that is fine. If you are part of a distributed who are in different timezones then to be productive you will have to learn how to remove the roadblocks yourself.
Now if you need to do that every 10 minutes then I would say it is a problem and not just a poor fit for remote work but a general problem that can be bad in a co-located team as well. Most of developers are going to dislike interruptions no matter how nicely you do that.
I wouldn't be too worried about "getting stuck" in the code. The larger and uglier the project, the slower it is to learn the components but I've learned to embrace getting stuck. It's part of the process and once you've figured it out you know that small part of the code base a little better.
I'm a dev who's been working for about 5 years, degree in CS, focus on JS front-end.
I would love to do remote and skip the commute, but I'm afraid to, mostly because impostor syndrome: while I'm a good coder, I tend to run into roadblocks involving the code written by other people (e.g. "I can't see where this is getting called from; I tried searching the codebase and don't see it anywhere...what is it for?" or else with the toolchain / build system (e.g. "The wiki really does not explain how to get this running locally at all, and these components are not compatible and I'm getting a version error from this, I'm really not sure what to do; tried googling extensively with no luck.")
I always seem to be the only one who has these problems.
While I tend to do well in person by being nice and asking a lot of questions, I'm concerned I may be a poor fit for a remote role as it requires a high degree of autonomy.
What do you think? Have you encountered these problems and still succeeded at remote work?