Trump probably played a role, but Brexit was far more important.
There are three main powers in the EU
Germany who pushes for integration for everyone but herself.
France who pushes for aggressive integration
The UK who is skeptical of the EU.
Everyone else can fo fuck itself, because in the eyes of the EU they don't matter.
Without the UK, there is no one pushing back against further integration.