Does Apple change the serial number of iPhones they take in when they refurbish them?
Typically no. Serial numbers cannot be 'edited' as such - they can be written to new products (such as a new logic board), but an existing serial on a logic board cannot be rewritten.
However, if a logic board is replaced, then that will result in a new serial number.
As an aside, Apple really does have an excellent refurbishment program. Refurbished Apple products come with a new outer shell, a new battery, and the same full one-year warranty they give to their new products. It is more expensive than buying secondhand, but you're paying for the peace of mind.