Oh, the flashbacks... This is one of the factors that pushed me to QGIS.
Anyway, you have to download correct ST_Geometry library from ESRI site. Thing is - ESRI lags behind PostgreSQL versions. So you can't use the latest or even second latest PGSQL.
https://pro.arcgis.com/en/pro-app/help/data/databases/add-the-st-geometry-type-to-a-postgresql-database.htm
EDIT: Most important question - what version of PGSQL do you have and has ESRI explicitly announced their support for it?