Ok, if you need make it client side you can run your query (arcgis js) and then you can use https://github.com/Esri/geojson-utils/blob/master/src/jsonConverters.js and convert featureset in geojson
Anybody looking to convert between Esri JSON and GeoJSON should check out the repository https://github.com/Esri/Terraformer. Terraformer contains a GeoJSON converter and a lot more functionality.
It's still not fully clear how to query ArcGIS server so that it returns "features" in the ESRI Json output. This goes back to my original question. What query is supported for getting the "features" geometry from ArcGIS Feature Server?
After a freaking hour plus, I have determined that ArcGIS Desktop 10.6.1 "Features To JSON" with the GEOJSON option ONLY WORKS with SHAPEFILE INPUT.
Come on, ESRI....
"Features To JSON" repeatedly crashed, after output for the first few polygons, on the 4th or 5th polygon geometry, WHEN USING a FILE GEODATABASE OR ARCSDE polygon FEATURECLASS INPUT.
I tested with 3 or 4 different polygon featureclasses that were in WGS84, whether or not within a featuredataset, in FGDB or SDE, no matter, it crashed every time with a useless "99999" err msg. The log file was also useless. Clearly it was choking when reading geometry.
Copy the same featureclasses into shapefiles, and the GEOJSON output option works fine.
ESRI, I can't believe your code doesn't support FGDB or SDE, only supports legacy shapefiles as input. And you want me to move to Pro...LMFAO
I'm sorry this is in the wrong forum...