Suspension stem
One thing you may not have considered is a suspension stem. Redshift makes one that is on sale just inside your price point. There are others forthcoming, and a big list of styles and discourse at CyclingAbout, including some downsides:
Why should you avoid suspension stems?
The biggest issue is that any downward force to the handlebars will result in energy loss. This is not great for people who like standing up on the pedals, but shouldn’t be much of a problem for people who spend most of their day in the saddle. An issue that the 90s suspension stems suffered was movement under heavy braking. I presume that this effect is lessened on the latest generation of products given how much less suspension travel there is.
I don't think energy loss is much of a concern for an ebike. You can just throttle up rather than standing on the pedals.
Please note that I have not used a suspension stem myself.
Do not be cavalier about a suspension fork
Juhist's answer correctly describes the trouble you're signing up for with your original plan. Remixing your bicycle's whole geometry is not undertaken lightly.
You can drop down to a 27.5" or a 26" wheel in the front to compensate for compression travel in a new fork, but now your budget needs to include the money for a wheel as well.
Buy some gloves instead
If I were in your place, I'd put 5-20€ toward a pair of cycling gloves before I spent 100€ rearranging the front of my bike.