This is likely the situation. However, I can’t find the instructions online for the flomasta (Rubbish anyway, bin it).
When you look at the danfoss instructions, that particular model comes with sub models (hard wired, rf wireless, battery hard wired).
You have 2 wires for the old stat. They will be a live connection (common) and a switched live.
You’ve identified the common as per you post where you say it’s connected to the boiler live (this is for safety, so when the boiler is isolated for maintenance, power to the stat is off).
The other wire must be a switched live as there is no other way to signal the boiler to come on. You’ve also proven this by wago linking the two wires.
Now, with this in mind, the replacement stat/programmable stat you choose, need power. You can’t use a hard wired 240v stat, as you’ve not got enough wires to provide a live/neutral/switched live.
So this means we have to use a battery powered unit. It uses battery power to operate itself and switch the incoming common to switched live.
If the common is 240v, it will switch and send back 240v, if the common is 24v, it sends that back.
With the danfoss, the instructions say that the common should be connected to port 2 and the switched live to port 3.
If you’ve got a multimeter, you can check the switch is working using continuity across the ports when the stat is calling/not calling.
If you prove the stat switch is working as above and you’ve proven the wiring with the wago, I’m at a loss.