Having sort of done this myself (self-funded for 18 months, then raised some friends-n-family and now cashflow positive), I would recommend:

- stay with your job (like others have said) as long as you can. I probably could have done this longer.

- control your cash burn, not just current but also the time horizon of the commitment. I have found that contract-based work can be very efficient for engineering work, IF you are good at specifying the technical job details.

- Before you get into a situation where you are spending more than you make (either because you kept your job but are spending more than your job pays, or because you left your job to do this before there is enough revenue to pay yourself living expenses), decide (with your partner if you have one) on some specific levels of your savings at which you will a) seek outside funding and b) close up shop and go back to finding a job. This will not only give you concrete goals to work towards (I need to get that customer to keep my bank account above $x!) but also help ensure that you don't blow yourself and your relationships up chasing a moving target.

- pitch to some institutional investors. "But I said self-funded!!". I get it. But recognize that:
a) the process of distilling a 10-15 slide pitch is very, very helpful in refining and focusing your business plan,
b) investors will have useful feedback,
c) the experience is helpful (even if to understand how often very silly the investor courting process is), and
d) having deep familiarity with any concerns that prospective investors have will help you to either address them, if you decide to do so, or alternatively, regardless of whether you agree with the concerns, to have thought ahead of time about how you will speak to them when other people have those same concerns such as prospective key employees and certain customers (especially large ones who may be about to sign a big check)

- find 1-2 other cofounders (who are not your relatives or spouse). you will have a ton of work to do, especially if you keep your day job, and you will want others to lean on, not just for the work but also emotionally (do not underestimate how physically and emotionally draining this is going to be). At least as importantly, just like pitching to investors, in the process of recruiting co-founders you will receive valuable feedback that will help you to refine the business

- Being fundable is a worthwhile option to keep open. For this purpose:

a) get a lawyer at least for certain key items. Ideally, a lawyer with prior experience at a startup-focused firm (Wilson Sonsini, etc) who has left and started their own practice. You'll probably pay 350-550/hr, but the person will be experienced and in my experience, this kind of lawyer will not excessively bill. I would advise against using any medium or large law firm at this stage unless you are ready to pay way, way more. Key items below.

b) make sure your IP is clean. Many states enforce employer's right to own the work you do outside of work hours. It is uncommon that your normal job will have absolutely nothing to do with your side project, which muddies the water even further. you should *definitely* review your employer handbook, policies etc, and research this topic. Keep in mind: you're not trying to be right in the case of a lawsuit, you are trying to avoid any possibility of any lawsuit. If there is any legal dispute with your employer, then regardless of whether you legally win, you automatically lose from a business perspective. Note: in many cases, it can be beneficial to be open with your employer about this side project. To decide, ask others in your firm who have gone thru this kind of experience (if you can find any such folks)

c) get the right corporate structure. An LLC can give you significant tax benefits when you are bootstrapping. A C-corp will be needed if you ever want to raise VC. I can imagine no reason to use an S-corp-- but that's what you want to ask your lawyer

Admittedly, you can still succeed doing none of this, and still fail doing all of this, but I hope these suggestions might help to maximize the probabilities in your favor