I run a lot of Python tools and it's faster to export all the data from AGOL into file geodatabases and run the analysis that way rather than running the script while it's pointed at the feature service. To do this, I export the feature service into a file geodatabase using the feature service's rest end point.
An interesting issue I have been coming across is that when I export a polygon feature service to a file geodatabase and a feature has a hole in it (please see screenshot), the polygon no longer works with select by location. But when I do the analysis using the feature service, the select by location tool works properly.
I had to select an additional point in the feature class screenshot to show that it's able to select one of the polygons but not the one with the hole in it.