Checking tickets can be done by not allowing anyone on the platform. Or world best practice is random checks and large fines if you are caught without a ticket.
Breaking rules is tricky. There is some need for that, though there are options, though in the end I will grant you this.
Trains should never serve food or drink. Passengers can get off the train at a station when they need that, and get on the next train. Space used for the food and drink is space that could be used for more seats. There is a reason all railroads have been trying to do away with food and drink service. It is considered bad practice everywhere.