Answer
No, factory resetting your iPhone will not alter your iCloud. Upon setting up your iPhone again you will be given the option to reconnect to your iCloud account if you desire. iCloud also stores iPhone backups that you can restore your phone from.
iPhone 6: Will Factory Reset Also Remove the iCloud Account from the Phone?
Delete iCloud account without Password – any iOS version – iPhone 8, 7, 6S, 5S, 5, 4S, 4
Does resetting an iPhone delete iCloud?No, factory resetting your iPhone will not alter your iCloud. Upon setting up your iPhone again you will be given the option to reconnect to your iCloud account if you desire. iCloud also stores iPhone backups that you can restore your phone from.