I have surveillance camera in front of my house that will be plugged in at all times through its USB power adapter. Also, I would occasionally plug in my electric pressure washer and possibly charge my car (yes, it is slow, but enough at 15Amps. AFAIK the car also slows down charging if it detects bad extension cord via voltage drop).
I am considering to get one of these smart power plugs, cut the plug off and attach to the lamp wiring (there was also a ground wire that I forgot to draw):
Is this idea fine as I would not be getting a dedicated electrical box that would be installed in the wall? Instead I simply plan to attach this smart power plug to the surface of wall