Erase Content & Settings from your old phone will have no effect on your other devices.
If you are uncomfortable, disconnect from iCloud on the iPhone 4 first.
Settings > iCloud > Turn off Find My iPhone if it is on then Delete Account > Delete > when prompted, tap Delete from My iPhone
Once in icloud, where to then?
You can access your Mail, Contacts, Calendars, Reminders & Notes synced with iCloud from iCloud.com with a web browser on your computer.
All your changes are uploaded to iCloud then pushed to all your devices. If you delete a contact from one of your devices or iCloud.com, it is deleted everywhere.