Answer
A consumer unit in a cupboard may pose safety risks if not properly installed. Issues like inadequate ventilation can cause overheating, and poor access may hinder quick emergency shutoff or maintenance. To ensure safety, the cupboard must allow for proper airflow, be made of fire-resistant materials, and provide easy access to the unit. Always consult an electrician for proper installation. There are many electrical regulations that need to be adhered to when carrying out electrical works which includes covering up electrical equipment.
There is more information in our article, Are consumer units in cupboards dangerous?