To clarify, you blame “not being a good enough software engineer” on working for the wrong companies?
Good (but not exceptional) salary working with old/stable technologies that solve established business problems in a digital way.
Working in high-load-kafka-like companies with salaries usually reserved for upper management of "boring" workplaces are the 0.1%.