Have a second dedicated wheel, cassette and chain. Use the "trainer wheel" with a dedicated cassette and chain on the trainer and your road wheel with its cassette and chain on the road. You can change the wheels in seconds and a chain with a quick link in only a few more. That also allows you to have different gearing for each use if you wish.