Unable to Import, edit certain records and edit Group settings: DB Error: constraint violation
It seems you have some entries remaining in civicrm_group_contact which point to the deleted civicrm_group entry?

You can confirm this with a query to look for group contact entries which point to a missing group.

-- Show contacts who belong to a group that doesn't exist.
SELECT * 
  FROM civicrm_group_contact 
 WHERE group_id NOT IN (SELECT id FROM civicrm_group);


If entries are found with that query, you can clear them out (or update them to point to the new group, or export those contact IDs, or ...).

-- Standard disclaimers apply; back up your DB before doing this!
DELETE  
  FROM civicrm_group_contact 
 WHERE group_id NOT IN (SELECT id FROM civicrm_group);


If updating, you'll want to avoid creating duplicate entries by reassigning group_id without checking for existing group additions.