I went from never selling old devices to selling two iPhones and an iPad in the past year. Here’s what I did:
1. If you’re replacing with a new iOS device, make a full encrypted backup to iTunes, or iCloud, from which to restore the new device. Though some prefer to setup new devices as new without carrying over all their setup and content, so it’s your call. Doesn’t hurt to have the backup anyway.
2. Turn off “find my iPad”
3. Sign out of your Apple ID on the device
4. Go to Settings -> General -> Reset, and choose the option to erase all settings and content from the device.