There is already a VB script for Linux and Windows in GitHub: https://github.com/johnboiles/hotspot_autologin
It works by grabbing session token (json) from: https://hotspot.vodafone.de/api/v4/session And send to: https://hotspot.vodafone.de/api/v4/login
But this method is not that convenient for mobile device. I didn't find a great way to read json in an automation app.
So, I found a better way to automate everything. If you visit following URL, you will automatically connect to BayernWlan. https://hotspot.vodafone.de/api/v4/login?loginProfile=6&accessType=termsOnly&sessionID=%7B%7Bsession.session%7D%7D&action=redirect&portal=bayern
The idea now is just automatically open this URL when you connect to @BayernWlan
I think in iOS you can just simply use Shortcut app. I don't have any iOS device so...
For Android user, I made a short tutorial for how to use Easer to create an automation. (not that good though) https://youtu.be/tqw_LNa0B8M?si=1KZ0teMVfddOXXgu
Easer is a FOSS app and you can find it in F-Droid (https://f-droid.org/packages/ryey.easer/)