Sonoff TX Ultimate controlling a Shelly dimmer advise

I am researching my new smarthome system.
Al want to use a Sonoff TX Ultimate or Sonoff M5 switches to control Sonoff or Shelly dimmers.
I was thinking to use the following settings:
short up = light on
short down - light off
long up = intensity up
long down = intensity down

Or with the TX Ultimate
Short tap = ON/OFF
swipe up = intensity up
swipe down = intensity down

I am planning to flash all the devices with esphome (or with Tasmota if nessesary)

Has someone already done this or is this even possible at all?
Hope someone can help me.

Yes its possible with esphome and/or Tasmota

Can you tell me how to configure the TX ultimate for short and long press?
I understant that the TX Ultimate only supports swipe left/right, correct?

Yes, probably easier with tasmota using device group.
Use switchmode12 and add 1 fake pwm pin for brightness control.

Sorry i am a total noob whit this,
How can I add a fake pwm pin?
Do I need te set switchmode 12 every time the switch has a powerloss

That was for the M5 switches, instructions are covered here and here

I’m not quite sure if Switchmode12 works with TX ultimate since there’s no button pins.
So you might need to create some custom rules for it