Im a programmer and i have a VPS, so you think i can put something there instead of using a virtual machine at my own computer?
You are a programmer then the technical thing is not a problem. Yes you can set your electrum on your VPS as long you can secure it lock Port 22 and just log in using Certificate key.
However, if I were you Im gonna setup 2 Wallet Hot Wallet and Cold Wallet the Hot wallet is a wallet that you are gonna do transactions daily so put 10-20% of your portfolio and cold wallet is wallet with additional security like hardware wallet and use it as hold wallet.
For the Metamask no need for VPS to run it you can directly setup on a phone and browser extension and use it as a hot wallet. and you good to goo