Hi Alan,
Welcome to PixInsight Forum. These 'wave like' artifacts are approximately periodic, that is, the distance between two successive wave maxima is approximately constant for the whole image. Periodic image features are easily characterizable in the frequency domain, so this is a good candidate to find an efficient solution based on the Fourier transform. I have made a quick try with good results.
The screenshot below shows the magnitude of the Fourier transform with automatic screen stretch applied. I've used the standard FourierTransform tool in PixInsight. As you can see, the wave artifacts are very well represented as two bright structures near the center of the transform, on the second and fourth quadrants:
The phase component of the FT is normally left intact in these procedures (who on Earth could understand it?

); you can see it iconized at the top right corner of the workspace above. We'll need it later, when we perform the inverse Fourier transform.
To fix the wave artifacts we want to remove the corresponding structures in the Fourier transform. An easy way to achieve this is by replacing them with the mean values of their surrounding areas on the transform. There are better and more accurate techniques, but in the present example I've wanted to keep things as simple as possible. First I've defined a small preview ('sample') close to one of the structures, which I've extracted as an independent image:
The Fourier transform has central symmetry. This means that the first and third quadrants are identical. In the same way, the second and fourth quadrants are also identical. What we want in this example is to replace the artifact structures with the mean value of the 'sample' preview. Because of the transform symmetry, we have to perform the same actions on the second and fourth quadrants. This task is relatively easy with PixelMath:
The PixelMath expression is the following:
dx = x() - width()/2;
dy = y() - height()/2;
rx = abs( dx );
ry = abs( dy );
iif( sign( dx ) == sign( dy ) && rx >= 2 && rx <= 12 && ry >= 3 && ry <= 7, med( sample ), $T )
where dx, dy, rx and ry must be defined as symbols. This expression replaces small rectangular areas covering the artifact structures with the median of the 'sample' image. I've found the correct coordinates with a bit of trial-error work. The result can be seen below:
Finally, we apply the inverse Fourier transform to the modified magnitude and phase components, which provides the corrected image:
I think the result is rather good with very little effort. The remaining gradient can be fixed very easily with DBE or ABE (AutomaticBackgroundExtractor). This is a very nice example of practical image processing in the frequency domain. Can we use it for the documentation of the FourierTransform tool?
Hope this helps. Despite this procedure can seem somewhat intimidating at first, due to the mathematical devices involved, believe me that the practical use of these tools is very intuitive. All it takes is a little practice.