My question is why would you want to switch to web development. IMO ML Engineering is an exciting field, I am curious to hear what your struggles are or qualms with the field.
"There is no such thing as stupid questions". This however, is a stupid question.
Solely depends on your effort/motivation to pick up a new skill. As with anything...