An experienced programmer is different from a mere mortal, by their behavior not to give up, but try again and again, until the program works. The key experience is: trying something, failing, then jumping back on your feet and trying again... fuck sleep (more coffee, please).
Possibly your muscle memory will also get better with time. You'll become more focused, and less tolerant for interruptions while working, (try calling me on the phone while I'm in the middle of debugging some buggy piece... not a nice experience) and will realize you missed a parentheses right while typing, or become more knowledgeable about common mistakes, so when you look at 1000 of pages of code, you have a good guess where to look for the error, or what tool (IDE or whatever) to use and how, to be better in finding such errors. Also, experience with specific technologies will give you the knowledge of the common pitfalls using that tech, and have the crucial experience that you have already got it to work before at least once, so you know there must be a solution (helps with keeping your sanity sometimes). It also often happens, that you have been using the "bleeding edge" and something was not working the way you expected it to work. Or, things have changed: the library you used last year got upgraded since, and the new version works a bit differently, but not well for your purposes. Happens. Takes time, but if you keep trying you will get it to work eventually. (alright, sleeping can help, sometimes... don't overdo it)
Regarding your programs becoming more complex with time. The greatest skill of a good developer is not how many programming languages she knows, or how many fancy technologies, but having the awareness not to walk into the trap of complexity, but to avoid it like a plague. You can read some quotes on my profile page related to this subject ;)
What is important is never to be discouraged if something is not working on first try. Try again and again, google for it, search for it on stackoverflow, or ask someone to help you out (colleagues, or even IRC). It is definitely a good reason to upgrade your communication skills, to be better in persuading other detail-oriented (possibly very busy) developers around you, to help you out by giving you a "second pair of eyes". Most common mistake from newcomers, is not doing their research before asking others for help... be able to show that you have put in some sweat-and-tears, trying to find the solution yourself.
What I found teaching non-programmers how to program (in courses, meetups, or at home), is that it's extremely hard, because they give up too early when facing something themselves alone, that is not working. They give it up, and they never get to experience the lovely feeling when you spent hours and hours on looking for a solution, with no result, then more hours, and still no result... hours and hours more, days and days and days... no result, until one day there is a breakthrough! My main point is, it's normal. Part of the game, "No pain, no gain".
That's why great developers / sysadmins are rare. Believe me, being a good developer doesn't depend on which university you came from. It's the battle hardened experience of knowing how to react, when something is not working the way you wanted it to work. When you feel that nothing you do seem to be working, and it feels there is no worth in trying it again, it's just not working, then have a coffee, and try one more time. And most importantly, avoid complexity ;)