I want to insert the image file, with only an empty alt tag. Removing all other attributes. This is what I´m aiming for:

<img src="myimage.jpg" alt="" />

I found a function that removes the width/height, but the title, alt and class attributes are still added to each image. With some additional regex magic it should be possible to remove those as well.

I hope someone can help me customize this function to have it remove all attributes.

Important: I don´t need to edit any image tags in my database, just the html that´s sent to the editor. Here´s the hook we can use: https://developer.wordpress.org/reference/hooks/image_send_to_editor/

yes, it's very simple.
basically what the function does is to get the full html string of the image (like the one you posted with all atributes)
then it searches for matching pieces of that html string, and it replace them with something else.

th second element in the function preg_replace() is what do you want to substitute the matching with. in the sample, it substitute it with nothing, so actually it delete them.

but if you change that second element, and put something like 'alt="your alt tag"' , it will substitute the matching attributes, with that only alt tag you passed.
like this (mind the single quotes to wrap your string, so the double quotes inside them will be read as part of the string):