Xiaomi A2 stuck in a reboot loop because of data partition
So, here's the best I could do:

Try to boot normally
The phone will crash and try to reboot to the recovery partition.
At that very instant, press volume down and power, so that it goes to fastboot instead
From fastboot, launch TWRP with fastboot boot twrp-3.4.0-1-jasmine_sprout.img
Once in TWRP, get a shell using adb shell
Then from this shell, look at the file /sys/fs/pstore/console-ramoops-0. It contains the previous kernel boot log!

In my case, here's what the boot log contains : init: Rebooting into recovery, reason: enablefilecrypto_faile. So apparently something is wrong with Androi File-Based Encryption…