You may be over complicating the issue.
You can do this with a simple .gcode file run from the SD card.
This is a modified version of the bed tramming gcode provided by Bambu.
M17 X1.2 Y1.2 Z0.75 ; enable and set stepper current
G90
G28 ; home all axis
G1 X128 Y128 Z220 ; move to center and lower the bed
Change the extension from .3mf to .gcode (I changed to .3mf to be able to upload the file.)
Homeandlowerbed.3mf (111 Bytes)