One thing that always haunted me, but seems ignored by many engineers, is the question: Did I pay for myself?
It can be a difficult question to answer, but restated, did sales that directly resulted from my work generate enough margin to pay my salary. That is a very crude measure since lots of other things have a claim on margin, but in many cases is not as low a bar as you would think. Be honest in evaluating your fraction of the sales. Sure you were solely responsible for the electronics design, but what about the enclosure, and packaging, and assembly, and BOM, and sales, and (gasp) management (include accounting, HR and all of those). A product is like a table. All legs are important (don't take this down a classic engineers rathole and point out that a twenty leg table can do without a leg or two. It is an analogy and is only instructive, not congruent to the real problem). Each leg loves to claim that the product wouldn't exist without them, and usually they are correct, but so are the other claimants. Who should also be haunted by the same question.
Once you have determined that you are actually paying for yourself you can go on to argue about who has the right share of the spoils. During my career I worked with many engineers who did not in my opinion pay for themselves. They were often some of the loudest complainers about low engineering pay.