Will Factory Reset Also Remove the iCloud Account from the Phone?
No, erasing all content and settings from iPhone will not affect your iCloud. Your iCloud account and everything in that account resides on remote servers at Apple and not physically on the phone. As far as best procedure, you should sign out of iCloud on the phone and disable it on the phone before resetting and erasing the phone. Upon setting up your iPhone again you will be given the option to reconnect to your iCloud account if you want. iCloud also stores iPhone backups that you can restore your iPhone from.