"All the text messages accidentally got deleted by tapping the red Delete button. But doing a full restore is a hassle. Is there a way to recover deleted SMS (or iMessage) messages from the iCloud backup without having to erase the whole iPhone and restore from factory default?"
It is true that doing a full restore costs great efforts. However, there is an easy way to retrieve text messages only from an iCloud backup. You don't need to restore the entire backup anymore.
FonePaw iPhone Data Recovery can restore specific information from iCloud which means it can restore messages from iCloud selectively. It is a powerful text messages recovery tool for you to retrieve deleted SMS/MMS/imessages. This software can also retrieve those data which is deleted, damaged, formatted or just lost under unknown reasons. Now, download and install the free trial version to start to retrieve text messages from iCloud.
Free download the trial version of iPhone Data Recovery here:
How to Restore Text Messages from iCloud
Step 1: Sign in iCloud and download iCloud backup files
Click "Recover from iCloud Backup File" and sign in iCloud with Apple ID and password as required. Then, select the file you need and download it and the program will scan this downloaded file automatically.
Step 2: Preview and recover text messages from iCloud
After scanning, you can view all iPhone data such as photos, messages, notes, videos, voice memos are listed in different categories. You can find "Messages" and "Message Attachments" easily. Choose them and click "Only display deleted item(s)" on the top of the window to save time to preview them one by one. Finally, tick on those messages you want and get them back with one click on "Recover" button.