The legal basis for CE marking is formed by EU regulations and EU directives. Products that fall under a corresponding legal basis must bear the CE marking. The manufacturer thus declares on his own responsibility that the product complies with the requirements of EU legislation.
As a rule, no testing by an independent body (testing institute) is required. Testing is only mandatory if it is provided for in the relevant EU legislation, e.g. according to the Machinery Directive 2006/42/EC, Annex IV, if no harmonised standards are available, in the case of machinery for lifting persons or persons and goods where there is a risk of a fall from a height of more than 3 m.
As a rule, no control measures are carried out by an independent body. The validity of inspection certificates is regulated differently. A time limit is not always regulated. Newer EU directives now specify time limits.
Misuse is sometimes published in the database of the market surveillance authorities. The Machinery Directive has set the maximum period of validity of EU type examination certificates at 5 years.
Further information (DE & EN):
https://www.din.de/de/neuer-inhalt/wdc-beuth:din21:328699610
CE marking - EU regulations, issuing the certificate - Your Europe (europa.eu)