All other things being equal, I'd rather stay in St. Goar than in Bacharach. There is a good selection of hotels right around the KD dock and the market square in St. Goar. All are in a good location. You don't have to stay at Rheinhotel St. Goar. Last October I stayed at the Hotel am Markt and was happy with it. You can specify a room with a river view. The train station in St. Goar is about a block up the hill from the market square. Being higher, you really don't get the train noise. But the point is, everything is right there, the KD dock, the hotels, and the train station. It's a lot more convenient than Bacharach.
I say all other things being equal. You have to pay attention to the schedule for the KD boats and the trains. I would much rather take the train to Bingen or Bacharach and the boat back to St. Goar. I once made the mistake of taking the boat from St. Goar to Bacharach. That's upstream, against a strong current. That direction is soooo slow. By the time I got to Bacharach I was bored with the river. So I would take the train and come back on the boat. Just mind the boat schedule and make sure you have time to get to the boat before the last trip back down the river.
As for the subject of Bingen to St. Goar or Bacharach to St. Goar, you do see more castles between Bingen and St. Goar than you see between Bacharach and St. Goar, but either way, you see enough. The important part, to me, is seeing the Pfalzgrafenstein and the Loreley, both of which are between St. Goar and Bacharach, and you can see them without going to Bingen.