> Am I in danger of injuring my hands?

Yes. Look into "repetitive strain injury" and "carpal tunnel syndrome". If you google "carpal tunnel syndrome guitar", you'll find many relevant articles, such as [this one](https://www.carpalrx.com/carpal-tunnel-from-guitar). 

> so I want to take the best measures

Use an ergonomic keyboard. Don't use Emacs (with its native keybindings).