Is it possible to write good papers in a startup?
A small startup will not have any money for hiring a person to write papers or form an independent research department.

Yet you can see startup companies appearing as author affiliations on academic papers, so a question might be how that is possible.

What happens is that some startups are funded out of research activities at universities, and at least during an initial growth phase they keep a tight connection to the university they are funded out of. Typically that would work in the way that a university research group develops a technology, and maybe a PhD student or post-doc working on that funds a company to commercialize the technology. Nevertheless, the research group may continue improving or working with that technology, and if that is in collaboration with the company, then of course company members will appear as co-authors on the papers coming out of that.

In that case, also the professor who originally supervised the research would also stay in contact with the company, usually even in some formal role such as on an advisory board, and would thus be available for further academic support.