I think that it could backfire, but is worth a test.
I know that pretty much every time I'm going to lose, I declare war on the leader to see if I can salvage it.
Even the game I'm in as Maya. I went Progress -> Rationalism. I want to make spaceship go vroom vroom.
Nonetheless I felt like I would get edged out by my battle for religion and politics with the nearby Ottomans being a thorn in my side. I was ahead in techs, but losing on policies and some other stuff, so I DoWed and kicked him in the teeth. I might need to again, but I went to war before it was too late and I feel much more stable now. (Also I was able to use his 'abuse' of Defensive Pacts against him by declaring war on his ally across the ocean, costing me a few boats to avoid a war on 2 fronts with his in-Continent ally and bypassing our DoF.)