Goto the URL opera://about and take note of the "profile" path.

Then, goto the URL opera://settings/clearBrowserData and clear history for all time.

Then, close Opera, browse to the profile folder in Windows Explorer (File Explorer) with file extensions and hidden items set to show under "View -> Show", right-click the "History" file, goto "properties", set it to "read only", and apply.

That will prevent Opera from saving history, even during the current session. And, Opera won't crash or complain about not being able to write to the history file.

Consider that a non-supported, experimental solution though. There might be some cases where the file being read-only is a problem (like with Opera Sync enabled). Didn't test every situation. But, you can try at your own risk.