Using dimensional analysis to guess formula ; too many flaws? [duplicate]

This question already has an answer here:

A horizontal pipe of uniform cross sectional area A empties into a bucket, filling it at a rate R(unit volume per unit time). The speed of the fluid within the pipe is v. Guess a formula for the pressure in the pipe by using dimensional analysis.

How would we go about this? I can work out the units of pressure to be (M/L(T^2)) where M is mass in kg, L is distance in metres, and T is time in seconds. But how would I form a guess using this? The correct answer involves guessing that the pressure depends upon the density of the fluid, the area, and the rate, which already is a big leap of faith.

But even then, it could be something like ln (density) or e^area. Furthermore, even if we decide not to use ln(density) etc, it could still be the case that, for e.g, pressure is related to (M^2/m0), i.e, the constant is NOT dimensionless, in which case we'd probably get something like infinite solutions.

Lastly, even if we refute using ln (density) etc and just decide on using powers of the variables ( assuming the constant is dimensionless), what would we do if we had a solution set consisting of more than one possible choice?

There are so many other things which can go wrong too. For example, it may be that it depends upon the density of the pipe, not the fluid. Why do we then still continue to use dimensional analysis to guess formulae?