Internet of Things based technologies are enabling the digital transformation in many sectors. However, in order to use this type of solutions, such as wireless sensor networks, in scenarios like transport, industry or smart cities, the deployed networks must meet sensible safety and security requirements. This article describes a Wireless Sensor Network design that applies multi-layered mechanisms and tools to ensure security, safety and reliability while maintaining usability in Rail and Industrial IoT scenarios. The proposed solution provides guidelines for choosing the best implementations given usual restrictions, offering a modular stack so it can be combined with other solutions.