Selectively delete Messages on macOS
It is possible to delete individual messages also in the Messages app on macOS. I don't know if exporting is possible.


Open Messages on your Mac computer.
Open the conversation which includes the messages you wish to delete.
Find and click on the specific text bubble (message) that you wish to remove. Make sure you select the entire message bubble, not just the text within it. (Easier to do this by clicking somewhere close to the corners of the message bubble. Your selection grays out a bit once selected.)
Press Command+Click to add additional message selections.
Once completed selecting, Control-Click or Right-Click and select Delete from the drop-down menu. (If you don’t see the Delete option, you probably selected the text rather than the message bubble. Control-Click or Right-Click after selecting multiple messages is a bit tricky. You may use the Edit -> Delete menu from Messages' menu at the top instead in either case.)


These directions mostly come from this source. You can take a look at it if you like a bit more detail on selective deletion and directions for other Messages related actions on your Mac. The official help page for Messages on macOS is also here.