Actually I would test one train track in the dishwasher first and make sure it doesn't crack from the heat, before doing the rest.
As a guest I would not have a problem eating the cake off the wooden tracks... I would presume my host has cleaned them properly.
(Buttercup--The wood tracks don't have a lot of nooks and crannies--I've not owned the plastic ones so not sure how they compare. There is just the fairly wide track for the train's wheels. I actually think they would be sanitized just fine with a good soak and scrub in soapy hot water, but personally I would go dishwasher route for added safety.)