The adapter you have seems to do the trick, I think most of us would lean towards a traditional doorbell transformer hooked up to the nearest power supply junction box. Which then you only have two wires from your transformer to your doorbell. Polarity won’t matter on the doorbell. I think that would be the cleanest way to do it. Also consider looking at your local codes and the doorbell manufacturers requirements.
The adapter you have seems to do the trick, I think most of us would lean towards a traditional doorbell transformer hooked up to the nearest power supply junction box. Which then you only have two wires from your transformer to your doorbell. Polarity won’t matter on the doorbell. I think that would be the cleanest way to do it. Also consider looking at your local codes and the doorbell manufacturers requirements.