What is the name for this Encapsulated SMPS
This component does what you expect. It takes AC mains as input, and outputs the specified DC voltage (at the specified power). It is actually made of a switched-mode controller and transformer, all integrated in a small plastic cube.

It is a rather common component used mainly for simple appliances requiring relatively low power, where the designers don't want to waste time designing a specific AC-DC supply. It seems perfectly appropriate to use them for the usages you describe. Of course, for high-volume products, designers usually go through the hassle of designing their own, because it can make the product cheaper. This is why it is not usually found in consumer products.

There is a wide choice for these components available from distributors, and is typically called "AC/DC power module". See those available from Mouser, for example.

Note: this component is galvanically isolated, so you need to be careful in your layout to maintain the isolation between primary and secondary. Just don't route the AC mains side and secondary side traces close to each other.