Here is a Lecture given my Max Planck on the Principle of Least Action.
https://www.ias.ac.in/article/fulltext/reso/013/02/0198-0207
In it he says
"As long as physical science exists, the highest goal to which it aspires is the solution of the problem of embracing all natural phenomena, observed and still to be observed, in one simple principle which will allow all past and, especially, future occurrences to be calculated...
Among the more or less general laws, the discovery of which characterize the development of physical science during the last century, the principle of Least Action is at present certainly one which, by its form and comprehensiveness, may be said to have approached most closely to the ideal aim of theoretical inquiry.
...
... it must be borne in mind that the strong conviction of the existence of a close relation between natural laws and a higher will has provided the basis for the discovery of the principle of least action. Provided, of course, that such a belief is not confined within too narrow limits, it certainly does not admit of proof, but, on the other hand, it can never be disproved, for then one could ultimately ascribe any contradiction to an incomplete formulation."
Planck says that Leibniz first enunciated the principle of least action as a reformulation of Newton's laws. He claims that at that time the principle had little practical application and for a long time was viewed as a mathematical curiosity. So it would seem that the Principle was not developed for the purpose of problem solving.
However, Leibniz was certainly looking for a general principle of the Universe.
For instance, Planck says "In this connection mention may certainly be made of Leibniz’s theorem, which sets forth fundamentally that of all the worlds that may be created, the actual world is that which contains, besides the unavoidable evil, the maximum good. This theorem is none other than a variations principle, and is, indeed, of the same form as the later principle of least action. The unavoidable combination of good and evil corresponds to the given conditions, and it is clear that all the characteristics of the actual world may be derived from the theorem, even to the details, provided that, on the one hand the standard for the quantity of good, and on the other hand the given conditions, be rigidly defined along mathematical lines..."
One is reminded again of the belief in causation that is found in Aristotle, Copernicus and Kepler. See my posts above for more detail.