One way to get what you want is to use WiFi smart plugs featuring power monitoring, which can be integrated into Node-Red. Node-Red can be run for example on a Raspberry Pi. From there you can also store the measured values in a database.
I would suggest you look into smart plugs, which you can integrate into your LAN via WiFi. All of those plugs allow you to control them via WiFi and some also feature energy monitoring (at a higher cost for the plug, naturally).
Typically, those smart plugs can be controlled via the manufacturer's app, which will also show you statistics about the energy usage, when the plug has that feature.
However, often you can either update them with custom firmware (e.g. Sonoff products, which feature an easily reprogrammable ESP8266 chip) or they have APIs that allow you to control them without the need to use any cloud service via the manufacturer's app.
One example are TP-Link smart plugs that I use in my home controlled via node-red.
Another example are tuya-devices, which are sold under a variety of brand names.