From the sound of it, you have two problems. Your rail joiners are not reliable current carriers, and you have some kinda crud on your rail heads.
You cannot depend upon rail joiners for solid electrical connections. Corrosion builds u[ inside them and eventually they go open. There are two fixes.
Solder all the rail joiners. This will solve the electrical intermittant problems but any movement of you benchwork, winter shrinkage, summer swelling, can throw your track out of guage or even cause it to buckle.
Or, run a good sturdy power bus underneath the layout and run feeders from the bus to every piece of track on the layout. Actually, running feeders to every other piece of track will do the trick. I use #14 solid copper house wire for the bus and #22 telephone wire for the feeders.
As for the crud or goop on the rails people use alcohol, mineral spirits, or GooGone to cut it. My layout is small enough that I can run over all the track with a rag faster than I can get a track cleaning train on the track and running. After cleaning the track, you need to clean the wheels on all your rolling stock. The wheels pick up crud from the railheads. I have seen wheel cheese so deep that the flange was covered. Anyhow, when you run dirty wheels over clean track, you have dirty track pretty quickly.
David Starr www.newsnorthwoods.blogspot.com
dinwitty...Sitting track over time will still collect dust on the heads...
That's why my track cleaning involves only the occasional use of a vacuum cleaner, although it does help that my layout is in its own finished room, not used for other activities. I only clean track, in the conventional sense of the phrase, after ballasting or adding scenery near the tracks. After that, a shop vac with the brush attachment or crevice tool is all it takes, and not too often, either.While replacing the loose rail joiners may have helped clear up some the the problems which you encountered, they will eventually cause problems, too. You can eliminate that by soldering them in place.
Wayne
Wow. The wall of text was very hard to read.
.
I have always been an advocate (well not always, but at least for 20 years) of using Kato Unitrack for all hidden trackage. It is rock solid and very reliable. Mine seems to require less cleaning, but I have no idea if this is actually true or not. It can be held in place by guide blocks glued next to the track so it is easy to replace if necesary.
As far as track cleaning... All of my layouts have been in climate controlled rooms in the main part of my house. I have never had bad dirty track issues.
-Kevin
Living the dream.