Making a reliable ceiling fan regulator

The standard cutout for a regular 5A socket is 50mm vertical x 47mm horizontal. The designed pcb is 46.7 x 62.7. 12.7 mm too large in one dimension. Also the pot should be mounted in the center of the board so that the board can mount on the back of a dummy socket cover. Reducing the board size by 12.7mm seems to be difficult.
Consequently we will have to mount the board horizontally, projecting the 62.7mm length inside the switch board. Therefore the pot will have to be mounted in the middle of the 46.7mm side towards one edge. This change looks feasible as the pot is already quite close to the desired location. We will also have to use a vertical switch with it’s knob projecting outwards and bend our LEDs by 90^o so that the light shines outside. We could use a light pipe - a piece of bent acrylic with the edges heat polished - if we dont want to bend LEDs. Heat polishing is nothing fancy. Just run a hot air gun along the edge for a few seconds. Or gently and quickly move the barrel of a hot soldering iron on the edge.
Light pipes can be used to make very pretty looking displays - Name plates, audio level displays, wall clocks etc.

Mounting the pot on the pcb enables using the pot as a mount point to hold the board to the dummy plate. However I personally do not like this as the pins of the pot are likely to break if you open your switch board a couple of times. I prefer to use a L plate fabricated from pvc or polycarbonate. Metal can be used too, but poses a hazard of coming in contact with a stray wire in the messy insides of a switch board. Which brings up yet another question.

Can we design a switch board without all the messy wiring?

@Farhan has already designed a relay board. Let's design IR control Board
Can it be used in a standard switch box? Will we need a hybrid with part microcontroller+relays and part regular switches? Or should we just get rid of the switches?
We already have zero crossing detection. In principle switching the relays at zero cross will extend it’s life to the maximum as there will be no arcing at the contact point. Which means the relays would last longer than the building.

What would you as a user want in such a microcontroller conrolled switch board?
Remotes?
App control?
Automation via RPi using sensors?
Capability to talk to solar MPTT controller / Battery backups?
Metering?