"""Create error_monitor
Generated by Phi-Octopus Eden
2025-11-08 00:04:51.295217
"""

```python
from typing import List, Optional


class ErrorMonitor:
    """
    A class for monitoring and handling errors in a limited recovery scenario.
    """

    def __init__(self):
        self.error_history: List[str] = []
        self.recovery_attempts: int = 0

    def log_error(self, error_message: str) -> None:
        """
        Logs an error message to the error history.

        :param error_message: A string representing the error message.
        """
        self.error_history.append(error_message)

    def recover(self, max_attempts: int = 5) -> Optional[str]:
        """
        Attempts to recover from errors. If successful, returns a recovery message;
        otherwise, returns None if max attempts are reached.

        :param max_attempts: Maximum number of recovery attempts.
        :return: A string indicating success or failure; None on failure.
        """
        for attempt in range(1, max_attempts + 1):
            self.recovery_attempts += 1
            # Simulate a recovery process (pseudo-code)
            if self._simulate_recovery(attempt):
                return f"Recovery successful after {attempt} attempts"
            else:
                pass  # Perform additional checks or actions

        return None

    def _simulate_recovery(self, attempt: int) -> bool:
        """
        Simulates a recovery process. This is a placeholder for actual logic.

        :param attempt: Current recovery attempt.
        :return: True if recovery successful; False otherwise.
        """
        import random
        success_rate = 1 / (2 ** attempt)
        return random.random() < success_rate

    def display_history(self) -> None:
        """
        Displays the error history.

        :return: None
        """
        print("Error History:")
        for error in self.error_history:
            print(f"- {error}")


# Example usage
if __name__ == "__main__":
    monitor = ErrorMonitor()
    monitor.log_error("Connection timeout occurred")
    monitor.log_error("Database connection failed")

    recovery_message = monitor.recover(max_attempts=3)
    if recovery_message:
        print(recovery_message)
    else:
        print("Failed to recover after maximum attempts.")

    monitor.display_history()
```