I now live in Luxembourg and public transports are just totally free: buses, tramways, trains... All free, for everybody (locals and tourists alike). No pass, no nothing: you just hop in the bus/train/tramway and you're good to go.
You can also rent public bicycles and they're all e-bikes/pedelec and they're very cheap (but not free).
This is the way to do it. Public transport is tax paid, one way or another anyway.
This completely gets rid of bullshit overhead like ticketing, ticket checking, payment processing, maintenance of payment terminals, manning of ticket counters, planning departments, billing and finance departments, third party payment fees etc etc etc