Something like PyAutoGui for Android is AutoInput. It's a part of the main app Tasker. If you've heard about Tasker, then you know what I'm taking about.
If not, them Tasker is an app built to automate your Android Device. If you need specific taps and scrolls, then you can install the plug-in Auto Input for Tasker. It's precisely allows you to tap a point in your screen.
Or, if you have a rooted device, then you can directly run shell commands from Tasker without the need of any Plug-in.
Now, you can get the precise location of your x,y coordinate easily.
Go to settings, About Phone, and Tap on
Build Number until it says, "You've unlocked developer options."
Now, in the settings app, you will have a new developer options. Click on that, then scroll down till you find "Show Pointer Location" and turn that on. Now wherever you tap and hold the screen, the top part of your screen will give you the x,y coordinate of that spot.
I hope this helps. Please comment if you have any queries.