If you want to have a good life and get rich as a software engineer and you want to factor luck out of it, then you won't try to build your own app or start your own company. There might be moments when yeah, becoming a founder as a software engineering might make sense. For example, if you're already at senior or lead level, you have contacts, you have experience and you're extremely employable, then you can say, hey, I'm going to give a year to this, I can always go back to my day job.
If you have at least six months of savings in the bank, or maybe you have an employment insurance that might give you some cash while you are busy building this thing, or moving back with your mom and dad. If you have small kids or you have your partner that you need to support financially, then building an app, it's not for you. It's okay, you don't have to do it. Also, you don't want to start this only because you hate your job or because you want to make more money.
If you don't like your job, you can switch it if you're willing to sync five years of your life. Into something that might not work, or if you have a co-founder who has the marketing and sales skills, and they also have integrity and work ethic. Until then, you're better off selling your time for money as a software engineer, enjoying life,