First: How many night trains are you planning to take? There are very few left in Europe.
Second: You are way overthinking and over concerned about luggage being stolen from trains. It did use to be a bigger issue several decades ago when people could just hop on and off trains. Now most are high speed, reservation only trains and some countries (notably Spain and the Eurostar) require going through security to board. There will not be gangs of thieves on trains cutting cables and locks. Some people still feel more comfortable securing their bag to the luggage rack so someone can't walk off with it (if just by accident), but for that I just use the shoulder strap or a cheap cable lock.
If you are just looking to lock the bag to keep someone from opening it, a standard TSA lock works just fine. Again, the intent is just to make it tricky to access, not make it Fort Knox. No one will sit at the end of a train car rummaging through bags.