Can we write an equation for it? at least in principle because I know that there are lots of variables involved. but if it really is a part of nature then why not?
Newton's laws are simple, they model of a simplified universe. They describes the relationship between "force" and the motion of a single object in an otherwise-empty universe.
If you consider two objects in the universe then there are a bunch of other laws: the law of gravity, laws of electrostatics, etc.
If you consider three objects in the universe then it cannot be generally solved by an equation:
In 1887, mathematicians Ernst Bruns  and Henri Poincaré showed that there is no general analytical solution for the three-body problem given by algebraic expressions and integrals. The motion of three bodies is generally non-repeating, except in special cases.
... and that's just classical mechanics, ignoring relativistic and quantum mechanics.
Something like the weather (how strong the wind is going to be, whether it will rain, what the temperature will be) is arguably "part of nature". There too there are "lots of variables" involved. In order to predict tomorrow's weather, "an equation" isn't enough: they need to use many, many equations, and a supercomputer on which to run simulations, and even then it's only limited accuracy and range.
Similarly I think it's possible to say that Karma exists and is a "natural law", just as it's possible to say that weather exists.
Perhaps you'd think it might be easy, but in practice it isn't easy, to describe weather even using several equations, let alone just "an equation". You needs laws describing temperature, pressure, density, fluid dynamics, Coriolis because the earth is spinning, differential heating, and then local weather caused by the existence of land and sea and mountains and ocean currents etc. etc. etc.
Again I suggest you stop trying to see a link between Buddhism and Physics. Physics is useful as far as it goes, but it cannot even describe the relationship between a boy and his dog (or perhaps "between a child and a teacher" if you don't have any relationships with dogs).
One definitely gets the impression that morality and karma are part of nature and not just some artefact we've created.
Karma is dependent on the intensity of volition of the person doing the action and the metal state of the person being the subjected to the volition. These states are not easy to measure empirically to build a equalization / mathematical model. The interactions among karma and the Niyamas are too complected also the theories for normal people other than a fully enlightened Buddha.
In my opinion the answer is "No", the Karma concept is not comparable to any law of nature.
First, I will explicate my understanding of Buddha’s Karma concept: Buddha did not invent the Karma concept. Instead, at his time it was already established by Brahmins and Jains. Asked for his own opinion concerning the causes of our experience like pleasure or pain Buddha explains (SN 36.21): There are natural causes like the physical conditions of our organism or environmental conditions like the weather. Further experiences are rooted in the behaviour of our fellow companions or are due to injuries. As a final cause Buddha names karma, i.e. what a person has done before, is the cause of certain experiences.
Hence Karma serves as an explanation when all other causes are excluded. Otherwise we had to say: We do not know. Therefore the Karma concept is an ad hoc hypothesis. 2.500 years of discussion show us that this kind of explanation can neither be confirmed nor refuted.
Secondly, I would like to explain how today’s science understands what a law of nature is: A law of nature is a rule which derives from a scientific theory. It can be confirmed or refuted by experience. At best such a rule can be stated as a mathematical formula.
Third, I will argue why the Karma concept is not a law of nature. The reason is: 1. Karma is an ad hoc hypothesis, which does not derive from a theory which explains a lot of other facts. 2. The Karma concept can be neither confirmed nor refuted. Both properties are opposite to what is required for a law of nature.
Besides: Because the Karma concept burdens in addition all people who suffer from an inexplicable stroke of fate, I would welcome everyone who abandons such a cynical concept.