Implementing a workflow that queries a REST endpoint using entities

1. What is the issue? Please be detailed.
I would like to query ArcGIS layers using Entities in my workflow. This would be a point-in-polygon query. So the user clicks on a map, then a query is made to an ArcGIS layer to get a specific value and populate a field in my form. I could not find examples using ODK, but I came across this workflow supported by Survey123 using pulldata() - https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-pulldata-quot-layer/ba-p/1224415

2. What steps can we take to reproduce this issue?
Please have a look at the following demonstration implemented using Survey123
The above link show cases the following workflows:
Point-in-polygon calculations using a map - the user click on a map to get the coordinates.
https://community.esri.com/t5/image/serverpage/image-id/54164i31AD912483FBDACB?v=v2
Point-in-polygon calculations using an address - the user types an address which is then geocoded to get the coordinates
https://community.esri.com/t5/image/serverpage/image-id/54169i98635FEE89938CB2?v=v2
Point-in-polygon queries for data validation
https://community.esri.com/t5/image/serverpage/image-id/54171iDC30151DC9D6900E?v=v2
Can a workflow like this be supported by Collect and Enketo (maybe the new webform engine)

3. What have you tried to fix the issue?
What I thought of is to take the geopoint (Latitude & Longitude) and ingest these into the ArcGIS layer rest end point:
https://services.arcgis.com/P3ePLMYs2RVChkJx/ArcGIS/rest/services/World_Administrative_Divisions/FeatureServer/0/query?where=1%3D1&objectIds=&geometry=148.176%2C-37.491&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&outFields=*&returnGeometry=true&returnIdsOnly=false&f=json

From the URL above I would replace geometry=148.176%2C-37.491 with geometry=${latitude}%2C${longitude}

But I am stuck on how to accomplish this.

I am also stuck on how to grab the the relevant value from the json output and ingest in the country field

4. Upload any forms or screenshots you can share publicly below.
Map Query.xlsx (547.3 KB)