How to use the mouse position features properly

I am trying to create an action chain with BTT which on a single button's "touch" fires several subsequent actions, most of which are mouse positions. I plan to use it to automate workflow in MAMP (that's a local server APP). The workflow consists of many clicks and mouse movements, to set up a new local server.

Nothing fancy if you think, it's just like you'd have your Browser open and with BTT mouse position and click actions you control certain actions in the browser, like let's say open a new tab on the press of just one BTT Button

In a nutshell, this is what the actions attached to my button look like:

  1. On press of Touchbar Button, it saves the current mouse position
  2. The BTT mouse position action moves the mouse to another position (a setting on my app open on the screen)
  3. BTT click action fires
  4. BTT mouse position action moves the mouse to another position
    Repeat 4, 5

Now the issue is, it seems the more such mouse-position and click actions I add, the more unreliable it becomes.

I realized adding some delay between each action helps, but still, after 3 or 4 action my mouse ends up somewhere totally unexpected on the screen.

It's probably pointless to add the exported set up here because it'll only work for MAMP on given screen size.
But I was able to replicate "unexpected" mouse positions in all tests I did.
All I do is chain a few mouse position events and clicks, and suddenly your mouse ends up somewhere unexpected or does not trigger mouse click event added.

Are there any limitations or similar, or do I need to save/reset the mouse position after each repositioning?

Right now I can use these features only for maybe one or 2 actions safely. The more actions added, the more unreliable it becomes.

This is due to the time the UI needs to build up. Adding some delays before each click might solve your problem, but not for sure.
Does the program you use support AppleScript? Or Shell actions? This might be way easier and reliable.

I hear once that macos has a security preventing you to move too fast your mouse. you can deactivate this via the preferences obviously.

Personnally, I'm using python for such type of action:
here is the script that I use:

import sys
import time
import Quartz.CoreGraphics as Q
#from Quartz.CoreGraphics import * # imports all of the top-level symbols in the module
def mouseEvent(type, posx, posy):
 theEvent = Q.CGEventCreateMouseEvent(None, type, (posx,posy), Q.kCGMouseButtonLeft)
 Q.CGEventPost(Q.kCGHIDEventTap, theEvent)
def mousemove(posx,posy):
 mouseEvent(Q.kCGEventMouseMoved, posx,posy);
def mouseclickdn(posx,posy):
 mouseEvent(Q.kCGEventLeftMouseDown, posx,posy);
def mouseclickup(posx,posy):
 mouseEvent(Q.kCGEventLeftMouseUp, posx,posy);
def mousedrag(posx,posy):
 mouseEvent(Q.kCGEventLeftMouseDragged, posx,posy);
#ourEvent = CGEventCreate(None);
#currentpos=CGEventGetLocation(ourEvent); # Save current mouse position
mouseclickdn(1533, 59);
for i in range(1500, 0, -100):
    mousedrag(i, 62);
mousedrag(59, 62);
mouseclickup(59, 62);
#mousemove(int(currentpos.x),int(currentpos.y)); # Restore mouse position