How to Export Google Calendar Events That Have Not Synced and are Stored Only on iPhone
What you're looking for is iMazing, which can do exactly what you want, and a whole lot more. The calendar export feature does require a paid license, and it is a pretty expensive program, but it's also available as part of Setapp, a subscription service that gives you access to more than a hundred otherwise expensive applications for $10/mo, but they also have a 7-day free trial.

Here's what I'd do:


Update your phone and your Mac! There have been many calendar sync issues fixed with updates to macOS 10.13; the phone should be at 10.4.1.
On your Mac, sign in to the Google account.
Sign up for and download/install Setapp.  
Download/install iMazing through Setapp.
Connect the iPhone to your mac and perform a full backup of the phone using iMazing (just in case).
Log into the Google account.
Make sure all calendars you want to sync are checked, here.
On the phone, under Settings > Calendar > Sync, make sure "All Events" is selected.
In iMazing, follow the instructions here to export each full calendar as an ICS file.
In Google Calendar, import the data from each of these ICS files.
Check that all your events, etc., are now available at calendar.google.com.
On the phone, delete any and all versions of this same Google Account under Settings > Accounts &amp; Passwords.
On the phone, open the Calendars app, tap Calendars at the bottom, and delete any and all remaining/duplicate calendars, particularly if there is one under "On My iPhone", and/or superfluous iCloud calendars.
On the phone, open the Calendars app, tap Calendars at the bottom, and delete any and all unused calendars, particularly if there is one under "On My iPhone".
Then you have two options:  

A. Switch to using the Google Calendar app from the App Store for iPhone.
   I recommend this.

B. If you wish to continue syncing Google Calendar with the Apple Calendar app:  


On the phone, re-add your Google Account in Settings > Accounts &amp; Passwords, making sure to select "Google" as the type, not "Other" or "CalDAV". Once added, check the account, and make sure calendar slider option is enabled.
On the phone, go to Settings > Calendar. Make sure "Default Calendar" is set under "Gmail" to the correct account.
On the phone, open the Calendar app. Under calendars, make sure only the calendar(s) you want are checked. At the top, under Gmail, should be the Google Calendar.
Give it a few minutes to sync up; you may need to quit the Calendar app and re-open it.



That should do it!

If anything goes wrong
you can restore from the backup from step 5.