It is possible to have fully digital ticketing with complete anonymity (again, assuming no external surveillance) using zero-knowledge proofs. As far as I'm aware, no such systems have been implemented for ticketing yet, but rapid progress is being made in implementing these for general-purpose digital identity situations.
There's also the much more pedestrian^ option, used for instance in Brussels, where the transport company simply promises not to track individuals even when it would be possible for them to do just that. That said, in Brussels I personally got the impression that a large proportion of passengers did not present tickets when entering a bus or tram, and indeed the Brussels Metro trains don't require that anyway. Thus tracking of individuals' movements would be quickly thwarted by apathy on the part of passengers!
^: not the most pedestrian option, naturally.
At worst, a paper ticket can reveal your location when you buy it, when you start a journey, and possibly when you transfer or end a journey. It's already a close to ideal system: it provides proof of the right to travel in the event of a ticket control, without needing to reveal your identity, destination, past or future journeys, home address, phone number, banking details, or any other extra info. Out of band info exists in either case.
A phone app, which is what everything trends towards and seemingly what most people want to use, almost certainly has access to enough information from your device to uniquely identify you. The default will be to ask for your location, and most will grant it. Now the app knows who you are, where you live, exactly when you travel, who with, to what destinations, etc.
The trend is always towards more surveillance. Regardless of what is technically possible, digital will always struggle to achieve the levels of privacy and anonymity that are trivial with century old technology.
I grew up with the paper tickets, and remember being jealous of people with a Navigo. They could go through the gates so fast, and the contactless tech and little "bling" sound the gate makes when they touch in seemed so futuristic and cool! I never thought I'd come to see the paper tickets as almost too good to be true. That they have survived this long feels like a glitch in history, and in a rapidly evolving world they're a strong reminder of what's being lost.
Some cities in Germany do this. Instead they do regular ticket inspection with high fines.
Makes for much smoother entry and exit to the stations and making the metro feel part of the city.
I hope that digital options which are as private as paper tickets will be implemented, because I don't want 'digital' to mean 'surveillance' by default!