diff --git a/core/misc/message.js b/core/misc/message.js
index aab12ff0aecf7832ed161a8699346b255b706fe2..dac4049db508350f2cc989ec782b22651e710b0e 100644
--- a/core/misc/message.js
+++ b/core/misc/message.js
@@ -37,13 +37,27 @@
      *   The default destination for JavaScript messages.
      */
     static defaultWrapper() {
-      let wrapper = document.querySelector('[data-drupal-messages]');
+      // Search for the element with '[data-drupal-messages]' selector.
+      // If not found then only try to search for fallback element.
+      let wrapper =
+        document.querySelector('[data-drupal-messages]') ||
+        document.querySelector('[data-drupal-messages-fallback]');
       if (!wrapper) {
-        wrapper = document.querySelector('[data-drupal-messages-fallback]');
+        // If no status messages element is found, a fallback element is created to prevent
+        // execution-breaking JS errors when attempting to report a problem.
+        // This scenario can occur on any page that does not include a status_messages
+        // render element.
+        wrapper = document.createElement('div');
+        document.body.appendChild(wrapper);
+      }
+
+      if (wrapper.hasAttribute('data-drupal-messages-fallback')) {
+        // Remove the fallback attribute if it exists.
         wrapper.removeAttribute('data-drupal-messages-fallback');
-        wrapper.setAttribute('data-drupal-messages', '');
         wrapper.classList.remove('hidden');
       }
+      wrapper.setAttribute('data-drupal-messages', '');
+
       return wrapper.innerHTML === ''
         ? Drupal.Message.messageInternalWrapper(wrapper)
         : wrapper.firstElementChild;
diff --git a/core/modules/system/src/Controller/BatchController.php b/core/modules/system/src/Controller/BatchController.php
index c66317c50a828ee66103bafce9aa13af0cbf591f..6d4bd31a82d8dfcbc5d3c76555ccc0e2884b493f 100644
--- a/core/modules/system/src/Controller/BatchController.php
+++ b/core/modules/system/src/Controller/BatchController.php
@@ -58,19 +58,6 @@ public function batchPage(Request $request) {
       return $output;
     }
     elseif (isset($output)) {
-      // Directly render a status message placeholder without any messages.
-      // Messages are not intended to be show on the batch page, but in the
-      // event an error in a AJAX callback the messages will be displayed.
-      // @todo Remove in https://drupal.org/i/3396099.
-      $output['batch_messages'] = [
-        '#theme' => 'status_messages',
-        '#message_list' => [],
-        '#status_headings' => [
-          'status' => $this->t('Status message'),
-          'error' => $this->t('Error message'),
-          'warning' => $this->t('Warning message'),
-        ],
-      ];
       $title = $output['#title'] ?? NULL;
       $page = [
         '#type' => 'page',