Help with Arduino controled x9c103 digital pot with rotary encoder

Hi all, I have plan to make adjustable power supply and I want to control it with rotary encoder. I am new to all this but so far I think I need x9c103 module from aliexpress, 1 rotary encoder from ali, 1 arduino nano. For voltage regulation I would use XL4015 board from china with current and voltage control. Later I would add 1602 lcd to display voltage and current values.

I need someone to correct me if Im wrong, On xl4015 board voltage is controled by 10k pot, x9c103 is 10k digital pot so i think it will be ok. Now im confused how to pick rotary encoder, does encoders have to match digital pot. value or any rotary enc. from aliexpress will work?

I put small illustration how i want to connect digital pot to regulator board, you tell me please is it correct way.

There are many x9c103 modules available. The one that I looked at requires at least 3 volts and no more than 5 volts across the potentiometer. Are you certain that your replacement will provide the correct voltage? If not, it may work, it may not work, or the module may be permanently damaged. Good Luck!

From other threads on this forum it seems it is not best option to use digital pot for buck converters.