One problem with RC oscillators, that concerns you here, is drift with age. It may be possible to find components that will drift slowly enough to stay within 1% of their rated value for a few years, but it's not a trivial task to find them. You won't be able to use an electrolytic capacitor as a timing element, for example, since it will dry out with age, changing its capacitance. Sometimes that's not a big issue (i.e. power supply decoupling), but for this application, that's a problem. So you'll have to stick with something like polyester or ceramic.
Changes in temperature may be the the biggest hurdle to overcome. I think it's reasonable to expect a change in frequency of well over 1% over a temperature range of 0°C to 40°C.
To obtain 40Hz with a 555, the main timing capacitor will need to be of the order of 100nF, to be able to use reasonable values for the resistors (in the tens of kilohms). One consequence of this is that the trimmer capacitor you place in parallel with it will have to be roughly 1% of that value, and you may have trouble finding that.
Therefore, calibrate using a variable resistor, not a variable capacitance. You can find trim-pots of any value quite easily.
How square do you want this signal? A 555 can't easily produce a square wave. The output of a 555, in the standard astable configuration, is rectangular at best. It will not have 50% duty cycle. You can modify the configuration with a diode to produce something quite close to 50%, but I've struggled in the past with this dilemma. You can solve that particular problem by producing 80Hz, and dividing by two using a counter or flip-flop IC, like a 74HC74.
If you want precision, you need a crystal oscillator, which you can build easily with a crystal, a couple of inverters and a couple of tiny capacitors. Unfortunately you will also need a clock divider IC, since the oscillator will be at least several kilohertz.
These days I almost always go the microcontroller route, using something like an ATTiny. This IC has a built-in RC oscillator, but it's heavily temperature and power-supply dependent, like your DIY version. For 1% accuracy, regardless of power supply voltage and temperature, crystal seems to be the way to go, which you can use with microcontrollers.
With a microcontroller, you need only two external capacitors and the crystal. The result will be a stable clock well within 1% of its rated value. The microcontroller will have the resources to divide by any factor you choose, to obtain 40Hz. The output can be perfectly square, too. All of this configuration is done in software.
If you still require some means of calibration, it's trivial to connect an external trimmer potentiometer to the microcontroller's ADC, and in software read its value and adjust the frequency accordingly. This way, you avoid having to write software unique to each production unit.
Lastly, using a microcontroller permits you to do anything you like to the signal, such as start the oscillator 500ms after power-on, or stop it if some input goes low, without the need for additional specialised hardware to implement these things.
Microcontrollers are cheap, predictable and flexible. RC oscillators are cheap, unpredictable and inflexible. I think this is a no-brainer. Your investment is time, and a programming setup, but the rewards are always worth it.