Microscopic structure and energy transfer of vacancy-related defect pairs with Erbium in wide-gap semiconductors