It seems like this problem could more easily be solved with a vending machine than a complicated facial recognition apparatus.
In Brazil as well.
You can usually avoid paying (many stations have pubs and restaurants with free toilets, for example) but you don't have to go to 30 years ago to find OECD countries charging for public toilets :)
[1] https://www.theguardian.com/uk-news/2015/sep/07/train-statio...