Between the two, I have no opinion. Rick Steves, of course, features Bacharach in his guide books, thus more people who follow him also stay there and post there impressions. St Goar does not lack charm, as can be seen from their tourist website here. It is across the river from the famous Lorelei rock formation and home of the Rheinfels Castle. St Goar may have lower lodging prices than Bacharach due to the latter's popularity.
The best way for a stopover in Cologne (according to the current schedule) is to take the local MRB train to Koblenz (9:22 from Bacharach or 9:33 from St Goar) and change to an IC train to Cologne arriving 11:05. Then you would have 3 hours and 41 minutes there before the ICE train to Amsterdam arriving at 17:27.
You should specify a stopover as both the IC and ICE trains take reservations and you will all want to be sure to sit together. If you purchase Sparpreis advance purchase nonrefundable discount tickets, you will be required to be on the trains listed on your ticket. Schedules and prices [here](www.bahn.com) and you can buy tickets 3 months in advance.