Don't run it empty or get it super hot. Gas generation and cell degradation really seems to skyrocket if cells drop below 3V, so don't run them flat. Doesn't seem to ever happen on devices kept on around the clock and powered so long as they aren't in crazy hot conditions.
Spicy pillows are basically caused by 1 of 2 things:
1. Heat
2. Being fully charged all the time
Recording video consumes a considerable amount of power, leading to heat. The display less so, unless you're operating at maximum brightness all the time.
#2 is what killed my Pixel 3 after only about 2 years. Once I started working from home, I had a bad habit of letting my phone sit on the charger all day and after about 3 months of WFH the pillow got spicy.
For a phone that's going to be repurposed as a server, I wonder if it'd be worthwhile to open the case and attach a heat sink to the battery.