Good idea to loosen the filter while it is warm. I drain the oil first, too.. If the filter is upside down, sometimes it works to punch a hole in it and let it drain into a pan before removing it.
Airplane engines have filters in the most god-awful places. The often use light metal such as flashing bent into the right shape and use it to drain the filter before removing it. Sometimes you put a bail or handle on it to hold it in place.