In these instances I add a generous scoop of baking soda (bicarb) and fill the flask with boiling water. Let it soak for a day, overnight at the very least, then attack with a stiff bottle brush (invented cos of small holes vs big hands
). If stains persist, repeat with sodium percarbonate "eco" stain remover - that definitely shifts tannins within an hour or two, so you'll get away with a shorter soak. Beware of oxygen generation with that - don't seal the lid tight!
You may want to consider buying another flask, so you have one for coffee and another for hot water only, which you can use to brew herbal teas with at your destination
Except it looks like you'll only be reaching your "destination" after drinking the contents of the flask...
Putting coffee in a flask is a n00b mistake tho
I usually travel with a camping stove and an espresso jug (maybe not on the train - the water flask might get a herbal tea exemption for that)
“There is a way of manipulating matter and energy so as to produce what modern scientists call 'a field of force'. The field acts on the observer and puts him in a privileged position vis-à-vis the universe. From this position he has access to the realities which are ordinarily hidden from us by time and space, matter and energy. This is what we call the Great Work."
― Jacques Bergier, quoting Fulcanelli