I want to push the code into production. You are allowed to modify comments and ad logging features in order to follow these goals:

Best Practices and Considerations
Error Handling: While you've included error handling in the sendEmailAndUpdateLabel function, consider adding error handling in other parts of your code, such as when accessing sheets or processing data, to make the script more robust.
Data Validation: Ensure that all necessary data (like email addresses and thread IDs) are validated before using them to prevent unexpected errors.
Performance: If your sheets have a large number of rows, consider batching your operations or adding checks to prevent timeouts due to the script execution limits in Google Apps Script.
Security: Be cautious with sensitive data. Ensure that any tokens or sensitive information are securely stored and not exposed in logs.
Logging Level: In a production environment, you might want to adjust the verbosity of your logs or implement different logging levels to avoid cluttering the logs with too much information.

Documentation
Comments: While the code is readable, adding comments to explain complex logic or important steps can help others (or yourself in the future) understand the code more quickly.
Function Descriptions: Adding brief descriptions at the beginning of each function can provide a quick overview of their purpose.

Code:

function sendEmails() {
  const ss = SpreadsheetApp.openById(SPREADSHEET_ID);
  const sheetNames = ['Nicht erreicht', 'Nicht erreicht 02', 'Nicht erreicht 03'];
  const contentSheet = ss.getSheetByName('Email Content');
  
  if (!contentSheet) {
    Logger.log('Email Content sheet not found. Please create a sheet named "Email Content".');
    return;
  }
  
  const contentData = contentSheet.getDataRange().getValues();
  const emailContent = {};
  
  contentData.forEach(row => {
    if (row[0] && row[1]) {
      emailContent[row[0]] = row[1];
      Logger.log(`Extracted email content for label '${row[0]}': ${row[1]}`);
    }
  });
  
  sheetNames.forEach(sheetName => {
    const sheet = ss.getSheetByName(sheetName);
    if (sheet) {
      processSheet(sheet, emailContent);
    }
  });
}

function processSheet(sheet, emailContent) {
  const data = sheet.getDataRange().getValues();
  const headers = data.shift();
  
  const mailSendenIndex = headers.indexOf('Mail senden?');
  const crmStatusIndex = headers.indexOf('CRM Status');
  const emailAddressIndex = headers.indexOf('E-Mail-Adresse');
  const threadIdIndex = headers.indexOf('Thread-ID');
  
  const rowsToDelete = [];
  
  data.forEach((row, index) => {
    const crmStatus = row[crmStatusIndex];
    const shouldSendEmail = row[mailSendenIndex] === 'Ja';
    const recipient = row[emailAddressIndex];
    const threadId = row[threadIdIndex];
    const currentLabel = sheet.getName();
    
    if (shouldSendEmail) {
      sendEmailAndUpdateLabel(recipient, threadId, currentLabel, emailContent);
      rowsToDelete.push(index + 2);
    } 
    else if (crmStatus && !crmStatus.includes('Nicht erreicht')) {
      updateLabelToErfolg(threadId);
      rowsToDelete.push(index + 2);
    } 
  });
  
  for (let i = rowsToDelete.length - 1; i >= 0; i--) {
    sheet.deleteRow(rowsToDelete[i]);
  }
}

function getGmailFooter() {
  var userId = 'me';
  var options = {
    'method': 'GET',
    'headers': {
      'Authorization': 'Bearer ' + ScriptApp.getOAuthToken()
    }
  };
  
  var response = UrlFetchApp.fetch('https://www.googleapis.com/gmail/v1/users/' + userId + '/settings/sendAs', options);
  var json = JSON.parse(response.getContentText());
  
  var signature = '';
  json.sendAs.forEach(function(sendAs) {
    if (sendAs.isDefault) {
      signature = sendAs.signature;
    }
  });
  
  return signature;
}

function sendEmailAndUpdateLabel(recipient, threadId, currentLabel, emailContent) {
  Logger.log('sendEmailAndUpdateLabel called with parameters:');
  Logger.log('recipient: ' + recipient);
  Logger.log('threadId: ' + threadId);
  // Use the correct key to get the subject and body
  const subject = emailContent['Subject'] || 'Re: Follow-up';
  let body;
  // Check if the sheet name exists as a key in emailContent
  if (emailContent[currentLabel]) {
    body = emailContent[currentLabel];
  } else {
    // If not, try to find a matching label in emailContent
    Object.keys(emailContent).forEach(label => {
      if (label.includes(currentLabel)) {
        body = emailContent[label];
      }
    });
    
    // If still not found, default to "This is a follow-up email."
    if (!body) {
      body = 'This is a follow-up email.';
    }
  }
  
  // Convert the body to HTML content
  body = '<html><body>' + body + '</body></html>';
  
  const footer = getGmailFooter();
  const fullBody = body + "\n\n" + footer;
  
  Logger.log('subject: ' + subject);
  Logger.log('body: ' + fullBody);
  
  const thread = GmailApp.getThreadById(threadId);
  if (!thread) {
    Logger.log('Thread not found: ' + threadId);
    return;
  }
  
  Logger.log('Thread found: ' + threadId);
  
  const messageIds = thread.getMessages().map(function(msg) {
    return msg.getHeader('Message-ID');
  });
  
  Logger.log('messageIds: ' + messageIds);
  
  const rawMessage = createRawMessage(recipient, subject, fullBody, messageIds);
  
  Logger.log('rawMessage: ' + rawMessage);
  
  const message = {
    raw: rawMessage,
    threadId: threadId
  };
  
  Logger.log('message: ' + JSON.stringify(message));
  
  try {
    const url = 'https://gmail.googleapis.com/gmail/v1/users/me/messages/send';
    const options = {
      method: 'post',
      contentType: 'application/json',
      payload: JSON.stringify(message),
      headers: {
        Authorization: 'Bearer ' + ScriptApp.getOAuthToken()
      }
    };
    
    UrlFetchApp.fetch(url, options);
    
    Logger.log('Email sent successfully');
    
    updateLabel(threadId, currentLabel);
    
  } catch (error) {
    Logger.log('Error sending email: ' + error.toString());
  }
}

function updateLabel(threadId, currentLabel) {
  const thread = GmailApp.getThreadById(threadId);
  if (!thread) {
    Logger.log(`Thread with ID '${threadId}' not found.`);
    return;
  }

  // Remove all existing labels that start with 'Erstkontakt calls/Nicht erreicht'
  const labels = thread.getLabels();
  labels.forEach(label => {
    if (label.getName().startsWith('Erstkontakt calls/Nicht erreicht')) {
      thread.removeLabel(label);
      Logger.log(`Removed label: ${label.getName()}`);
    }
  });

  let newLabelName;

  switch (currentLabel) {
    case 'Nicht erreicht':
      newLabelName = 'Erstkontakt calls/Nicht erreicht/02';
      break;
    case 'Nicht erreicht 02':
      newLabelName = 'Erstkontakt calls/Nicht erreicht/03';
      break;
    case 'Nicht erreicht 03':
      newLabelName = 'Erstkontakt calls/Nicht erreicht/Lost';
      break;
    default:
      Logger.log(`Unrecognized label: ${currentLabel}`);
      return;
  }

  Logger.log(`Transitioning label to '${newLabelName}'.`);

  // Ensure the new label exists by creating it if necessary
  let newLabel = GmailApp.getUserLabelByName(newLabelName);
  if (!newLabel) {
    Logger.log(`New label '${newLabelName}' not found, creating it.`);
    newLabel = GmailApp.createLabel(newLabelName);
  }

  if (newLabel) {
    Logger.log(`Adding new label: '${newLabelName}' to thread ${threadId}.`);
    thread.addLabel(newLabel);
    Logger.log(`New label '${newLabelName}' added.`);
  } else {
    Logger.log(`Failed to create or retrieve new label: '${newLabelName}'.`);
  }

  // Log the labels after modification
  const updatedLabels = thread.getLabels().map(label => label.getName());
  Logger.log(`Updated labels on thread ${threadId}: ${updatedLabels}`);
}

function updateLabelToErfolg(threadId) {
  const thread = GmailApp.getThreadById(threadId);
  const oldLabels = thread.getLabels();
  const erfolgLabel = GmailApp.getUserLabelByName('Erstkontakt calls/Nicht erreicht/Erfolg') || GmailApp.createLabel('Erstkontakt calls/Nicht erreicht/Erfolg');
  
  oldLabels.forEach(label => {
    if (label.getName().startsWith('Erstkontakt calls/Nicht erreicht')) {
      thread.removeLabel(label);
    }
  });
  
  thread.addLabel(erfolgLabel);
}

function createRawMessage(to, subject, body, messageIds) {
  const newMessageId = '<' + Utilities.getUuid() + '@gmail.com>';
  const references = messageIds.join(' ');
  const inReplyTo = messageIds[messageIds.length - 1];
  
  if (messageIds.length > 0 && !subject.toLowerCase().startsWith('re:')) {
    subject = 'Re: ' + subject;
  }

  // Encode the subject if it contains non-ASCII characters
  const encodedSubject = /[^\x00-\x7F]/.test(subject) 
    ? '=?utf-8?B?' + Utilities.base64Encode(subject, Utilities.Charset.UTF_8) + '?='
    : subject;

  const htmlOutput = HtmlService.createHtmlOutput(body);
  const escapedBody = htmlOutput.getContent();

  const rawContent = [
    'MIME-Version: 1.0',
    'To: ' + to,
    'Subject: ' + encodedSubject,
    'Message-ID: ' + newMessageId,
    'References: ' + references,
    'In-Reply-To: ' + inReplyTo,
    'Content-Type: text/html; charset=UTF-8',
    'Content-Transfer-Encoding: base64',
    '',
    Utilities.base64Encode(escapedBody, Utilities.Charset.UTF_8)
  ].join('\r\n');
  
  return Utilities.base64EncodeWebSafe(rawContent);
}