Cassette / chain using same bike in- and outdoors

Same cassette on the trainer all the time for me. I have a chain wear indicator in reach, and check it once a month, or every time I lube the chain (whichever comes first). If you keep chains with minimal wear on both bikes, you should not have too much problem with the cassette.

That said it can depend on the specific cog or range of cogs you use. If you lock into a single cog for ERG, that one will see more wear and may lead to the need to replace the cassette at different frequency from the chain.