It is not clear if that flickering occurs when the lamp is switched on or off.
The one-shot flickering - when the Lamp is switched off - with a period time of seconds to minutes is often simply caused by wires running parallel.
If a LED lamp is switched off, still some current can flow through the capacitance between the wires which are inevitable with the usual power cables.
A lamp switch or a dimmer is some kind of bridged by those between - wire- capacitors.
This is a very tiny current, which also flows through switched-off old style incandescent bulbs. But no effect is visible, no low frequency flashing is possible, since these bulbs can not store energy.
But some LED drivers have huge capacitors - elcos- for smoothing out the rectified net voltage.
The tiny currents in switched- off state will slowly accumulate in those elcos. If the voltage is still low enough, the driver electronic can not start working.
But if a certain threshold is reached, the electronic starts working and thus discharges the energy stored in that elco in a short flash of LED light. Now the elco has much less charges or is even empty and the cycle starts again.
Especially lamps which can be switched from different switches have a higher probability to produce these flashes, since there are more parallel cables involved. F.e., between 2 switches 3 wires run, of which one is always hot, another wire is directly connected to the switched-off lamp. Even if switched off, some tiny current flows between the hot and the floating wire.
A flickering when the lamp is switched on would most likely be a defect LED bulb which should be taken/sent back to the seller under warranty.
Other possibilities for flickering when switched on:
If other devices produce spikes in the net, the current through the LEDs could drastically increase. Many LED bulbs have simple "capacitor power supplies". There is a capacitor in series with resistors and the LED diodes. A capacitor will decrease its resistance, when the frequency increases. Spikes, which could be produced by motors in pumps, compressors (refrigerator, heat pump), drill machines, vacuum cleaners, garbage disposals, etc. and/or devices with triac power phase controls consist of high frequencies.
The capacitor in the LED power supply is only meant for 50/60 Hertz and will increase the current during the spikes for 2 reasons: higher voltage and higher frequencies, which will result in fast flickerings.
Motors and phase controls have filters to suppress those spikes, but those filters could fail or could be missing in old/cheap devices.
The spikes could be effective only in some places of the network, since a domestical power net is a very complicated network for high frequencies >> 60 Hertz.
The grounding of a domestical power net should be realised in one and only one central location, f.e. near the incomer supply line from the power supply company. If a desktop PC is connected to a HIFI Stereo set with a FM-tuner, a loud 50/60 Hertz humming noise could be heard, which disappears when the cable from the tuner to the socket for the roof-antenna is disconnected.
This double grounding is a huge loop (like a secondary winding in a transformer), which could be also produced by double or even multiple connections between Ground and Neutral.
That ground loop(s) could be antennas for spikes which could be a reason for the LED flickerings as well resp. could increase the probability for flickerings.
Just to mention a trivial reason (switched on case): a loose contact ( f.e. backstabs) could reduce the voltage for the LED below the operating voltage range ( f.e. 90 to 250V). A voltage measurement would yield different voltages for on/off.
If no multimeter is available and the circuit can be loaded with a hair dryer' s power demand, the hair dryer would work with a complete other motor sound compared to the same hair dryer connected to another circuit - if the hair dryer worked at all. And the sound of the hair dryer connected to the lamp circuit would also change if the heating level is changed ( f.e. by pressing the switch for "cold" air).
Also an incandescent bulb could reveal the loose contact by different brightness.
Of course, safety first in all works, especially when the lamp circuit has to be (temporarily) connected with an extension cord to accept the hair dryer.