How does a small company attract and keep senior engineers?
Since a small company does not have the resources to offer huge salaries, how can it attract talent?
Just one part is listening to employees. If the designer says putting a button in a specific place is bad from a UI/UX standpoint, listen. When an engineer says there's a better way to do XYZ, listen. You don't have to agree or do what they say -- but if you listen well people will generally respect you, it's when managers don't listen and don't give the vibe that they're even trying to listen that they lose talent.
Sift for intelligent and hungry candidates that can grow into the senior roles. You're offering the incentive of greater responsibility and the opportunity to grow beyond their current level. To retain them long term, you're going to have to up the ante on salary etc.
I imagine there is a pretty big pool of skilled senior engineers that cannot pass stereotypical leetcode interviews, especially at the more competitive companies. That's something you can tap into.
Not all senior engineers make huge salaries. Senior engs with decades of experience at many non-tech companies might make slightly more than a junior or mid level engineer at a mid to top tier tech company. For every elite senior engineer at a competitive elite SV tech company getting 300k+ before hitting the 10 year mark, you have many senior engineers at boring non-tech companies that might be lucky to hit 200k when they retire after decades of work.
(Although it could be argued that such senior engineers are not quite as skilled or "senior" as a senior engineer at a tech company - disclaimer - I speak as a "senior engineer" at a non-tech company myself)
Don’t forget there are other kinds of benefits you could offer. For example, anything related to work life balance: 4 day work week, more generous PTO, reduced summer or winter hours. Get creative with it.
I would say competitive compensation/benefits packages are a part. I would like interesting subject matter and respect too. I would also say that it might be good to hire midlevel devs, or at least give them a chance. One man's midlevel might be another's senior.
Logged in just to say this, echoing several others in this thread. Offer them autonomy (trust them), and offer them flexibility -- I am planning to negotiate a 4 day workweek for myself at my job at a tiny company.
Interesting projects and control over the work. Give them choice in technology, layout, stack, etc. Let them make it their project.