Look up 90 Degree Angle HDMI cables. Yes it would work. You could get some adhesive zip tie hooks and do a bit of cable management on the rest of the cable and pin it to the back the monitor or mount.
90 def cords:
https://www.amazon.com/Cable-Matters-48Gbps-Ultra-Degree/dp/B094K1KC72/
Cable management stuff:
https://www.amazon.com/gp/aw/d/B08RMS5H25