Earth's moon has unstable orbits:<p><a href="https://en.wikipedia.org/wiki/Lunar_orbit#Perturbation_effects" rel="nofollow">https://en.wikipedia.org/wiki/Lunar_orbit#Perturbation_effec...</a><p>Gravitational anomalies slightly distorting the orbits of some Lunar Orbiters led to the discovery of mass concentrations (dubbed mascons) beneath the lunar surface caused by large impacting bodies at some remote time in the past. These anomalies are significant enough to cause a lunar orbit to change significantly over the course of several days.<p>See also:<p><a href="https://science.nasa.gov/science-news/science-at-nasa/2006/06nov_loworbit/" rel="nofollow">https://science.nasa.gov/science-news/science-at-nasa/2006/0...</a><p>Joining an earlier subsatellite PFS-1, released by Apollo 15 astronauts eight months earlier, PFS-2 was to measure charged particles and magnetic fields all around the Moon as the Moon orbited Earth. The orbit of PFS-2 rapidly changed shape and distance from the Moon. In 2-1/2 weeks the satellite was swooping to within a hair-raising 6 miles (10 km) of the lunar surface at closest approach. As the orbit kept changing, PFS-2 backed off again, until it seemed to be a safe 30 miles away. But not for long: inexorably, the subsatellite's orbit carried it back toward the Moon. And on May 29, 1972—only 35 days and 425 orbits after its release—PFS-2 crashed.<p>Be careful of the orbit chosen for a low-orbiting lunar satellite. "What counts is an orbit's inclination," that is, the tilt of its plane to the Moon's equatorial plane. "There are actually a number of 'frozen orbits' where a spacecraft can stay in a low lunar orbit indefinitely. They occur at four inclinations: 27º, 50º, 76º, and 86º"—the last one being nearly over the lunar poles. The orbit of the relatively long-lived Apollo 15 subsatellite PFS-1 had an inclination of 28º, which turned out to be close to the inclination of one of the frozen orbits—but poor PFS-2 was cursed with an inclination of only 11º.<p>edit: added additional information about frozen orbits.
I also got interested in this question a few years back and while browsing for candidates I learned about Neso, the outermost (known) moon of Neptune. <a href="https://en.wikipedia.org/wiki/Neso_(moon)" rel="nofollow">https://en.wikipedia.org/wiki/Neso_(moon)</a><p>It is on average further away from Neptune than Mercury is from the Sun! It takes more than 26 years to orbit Neptune, it still hasn't completed a full orbit since we have discovered it.<p>Also, I think there could be "binary-moons", if a binary asteroid gets captured as an irregular moon.<p>Asteroids with natural satellites exist and have been found.<p>There could also be very big trojans moons/planets in other star systems.
To the Sun, a moon is like a submoon to the planet, so what would be the difference? With enough distance in between it should be possible. Not probable but possible.<p>Submoons will probably clump together much easier in the formation phase of any system and a moon will never capture an asteroid before it's planet does.<p>As the author pointed out, the question remains how stable it is. The almost nonexistent cases (at least in our Solar System) shows how rare it is. Maybe only distance is a factor. Huge Solar Systems with twice the distance between objects will also have more submoons.
Of course this is just within the arbitrary distinctions of what constitutes a moon and a planet. A particle of sand in the Sahara desert orbits the earth's core albeit with a lot of collisions with other sand moons.
As programmers, the answer is "of course". Of course a function can call a function. But nature isn't a stack. Can submoons have subsubmoons.