This is kinda true sometimes (not a great answer I know!)
You get paid relative to what the industry is willing to pay. High end web devs could be getting paid well by working for a well paying company, classic examples would be FAANG companies. You could also be a “web dev” and working on wordpress making 60k a year.
You could also not be doing web dev and be getting paid what you want, it all just depends on what company you work for, and what they are willing to pay.
“Web Dev” doesn’t automatically guarantee what you want, it just might come to mind first. If you like the idea of web dev just because of the paycheck, I’d also consider where you background currently is to see if there is something “closer” to your current skills.
For example, C++, C#, Python + powershell sounds like a .NET shop background. .NET as a framework can be used for the web, but it also can be used outside of the web context. Web might be popular due to accessibility, but there are transferable skills, and thus transferable job sectors where this would still apply.
You could also just be a back-end dev to support front-end web applications, and still be “in the ballpark” all while still working with what you already know. HTML/CSS/JS is just part of the puzzle.
I’d consider this first, as you said its a low risk attempt and most companies support internal job transfers as its cheaper than hiring a new person outright.