Of course!
With any solution, you’ll need to have some awareness around SQL injection, CSRF, XSS, etc. Some frameworks have sensible defaults to help you avoid common mistakes, but there’s no 100% fool-proof solution.
Right now I’m in dev mode and haven’t deployed anything yet. DigitalOcean does have a managed app platform: https://www.digitalocean.com/products/app-platform