You're correct - the trim tool only seems to work with other line features.
Faced with a similar situation that you laid out, I first performed a spatial selection that targeted line segments intersecting with a polygon feature (in my case it was a parcel fabric). Using this selection, I targeted the parcel boundaries that intersected with the line features. I then used the Clip geoprocessing tool to create a new feature class containing the overhangs using the selected parcel features as a reference. Finally, I used the Erase (Analysis) geoprocessing tool to delete the overhang segments from my line feature by setting the overhang feature class as the "Erase Features".