Certainly the improvements in crime, cleanliness, and perception of help drive ridership to some extent, and definitely improve the rider experience. Crime is
down 45% YoY, there is increased police presence, and all 50 stations now have the Next Generation Fare Gates, which has dropped fare evasion 59% (there are still some people that "tailgate" and try to sneak in, or climb over other low walls/barriers).
In terms of cleanliness, moving from the older legacy trains to the newer "Fleet of the Future" trains has helped a lot. We just got our 1,000th car delivered back in July, and are now up to 1,051 cars received. The new trains are much easier to clean and maintain, with non-porous, wipeable vinyl seats and doors. There are fewer seats so cleaners have better access to cleaning the floors, making it faster and more thorough.
Of course, a lot of the increased ridership is also due to return to work policies. Overall, hard to quantify how much exactly each component contributes to increasing ridership, but I think it's safe to say they're all important and contribute to each other. Increased workers riding helps increase safety numbers and perception. Increased safety and cleanliness results in more workers and other people opting to ride BART.