Avoiding MDF (and particle board) is a wise move - it will sag without a lot of support - needs a lot more support than plywood or solid wood. MDF and particle board are great products when used appropriately, but trains are just too heavy for them.
Gluing a solid wood strip to the edge is a great idea; I frequently do this when building shelves for cabinets. However, doing it right requires some equipment that you might not have - biscuit joiner, clamps, air nailer - need to keep the joint tight while the glue dries. Hopefully there's a woodworker in your club who can offer assistance.