Vic,
Not sure whether you question was more from programing side or not. If the Q was about programming side, then you can skip the rest of my comment.
Otherwise, if you publish your data from ArcGIS Pro and as a map service (aka map image layer), you can use display filters - as the name suggests, unlike def queries this only affects drawing, but if you want to query/identify you can still do that on features that are not drawn
Use display filters—ArcGIS Pro | Documentation
please let me know if you have any question.
Thanks.
Tanu