We used to use a similar method when cleaning particularly dirty old coins that we didn't want to damage. Instead of molasses, though, we used olive oil (not virgin or extra virgin, the crudest kind we could get). I'm betting that would attract fewer ants and get a similar effect going.