here is a Ruby/Rails solution Hubspot CRM API Delete a secondary email address · GitHub
Only dependancy is HTTParty (no hubspot gem)
Uses hubspot v1 API endpoint “https://api.hubapi.com/contacts/v1/secondary-email/…” with “private apps token” (meaning it will work after Nov 2022)