You have all the data you need in a database - so build the Dashboard from the database - then you can give each button the right id from the data, no need to build loads of buttons - just 1 inside a loop over your data. Then when a button is pressed, it sends the ID back to Node-RED and you use that to output to the correct device.
I'm not seeing a problem or a downside to this? Have I missed something?
Here is an example from my home automation system. I'm not using Dashboard but the principle is exactly the same - the data to build the buttons comes from, in this case, a variable that is set from a simple trigger - if I ever need to add more devices, I simply edit the source JSON. I don't ever have to mess with the UI. Even the location info comes from that JSON so that I can group buttons together by location.
Similarly, this device list with detail data is build the same way:

