There is a Magisk module ADB and Fastboot for Android NDK.
You can find it on GitHub and easily install from Fox Magisk Module Manager app
If you install to the phone A, then you can run ADB or Fastboot commands from tel A to tel B (connected by a double-sided USB-c cable)
Ie, then the phone A serves as a PC
You must run commands from Terminal app, under su, on the phone A.
A must be rooted (for Magisk and that module), B is just a slave in Fastboot mode
You cannot use bat scripts, but sh scripts (from the unzipped fastboot ROM) might work - probably you would additionally need BusyBox and/or ToyBox (for more shell commands if needed by the Xiaomi.eu sh scripts)
This is just a hint. I did play with that module (2nd screenshot: executing three fastboot commands from my MI 9T = tel A to Mi 11 Lite 5G NE (Lisa) = tel B) but:
- I did not try to do what you want
- I will not provide you further support about