The biggest question is when this happens- if it's after the War of the Julich Succession then the Bourbons stand to inherit Julich Cleves Berg on the Rhine, to say nothing of the electorate. There is also the matter of cadet lines in IIRC Ansbach and Hohenzollern who will also need to die out for this to happen.
This will absolutely spark a war as that is a lot of power and territory and France in the latter 17th century was already scary enough to prompt several coalitions.
In terms of sides I think:
France
Sweden (promised Prussia and or Pomerania)
Bavaria-could gain part of the Hohenzollern imheritance- one of the cadet territories in Franconia perhaps?
The Ottomans?
Austria (duh, likely claim Brandenburg via right of escheat as HRE)
Britain (also duh)
Poland (former overlords of dual Prussia, probably want it back... may be busy with the Deluge)
Wild card- the Dutch. This is post Glorious Rwvolution and France on the Rhineland isnt necessarily something they want. Then again they dont want the habsburgs in JBC either.
Most likely result is a partition, rhenish territories to France, Prussia to Poland, Bavaria gains Brandenburg proper, though it very much depends on the course of the war, ie France could demand part of the Habsburg territories e.g. Belgium or the Free County i think they would need to offer the Habsburgs something in exchange (say Brandenburg and its electoral vote to a cadet line). There is also the religous angle to consider, the Hohenzollerns are Protestant and France and Austria and Bavaria are all Catholic, likely you'd need a new electorate for the Protestants (Hannover?).