The problem is not RichTextBox, it is caused by using StackPanels. The examples below reproduce the problem / solution using simple rectangles.
The vertically oriented StackPanel expands to the size of the content. This means that the ScrollViewer inside it cannot stretch correctly. For ScrollViewer to work, it must have a fixed size.
This simple example does not work for the same reason:
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<StackPanel Margin="0,0,0,0" Width="480" Orientation="Vertical">
<ScrollViewer Margin="0,0,0,0" VerticalAlignment="Stretch">
<StackPanel Margin="0,0,0,0" Width="Auto" >
<Rectangle Fill="Aqua" Height="200"/>
<Rectangle Fill="Red" Height="200"/>
<Rectangle Fill="Yellow" Height="200"/>
<Rectangle Fill="Blue" Height="200"/>
<Rectangle Fill="Green" Height="200"/>
</StackPanel>
</ScrollViewer>
</StackPanel>
</Grid>
( ScrollViewer):
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
<ScrollViewer Margin="0,0,0,0" VerticalAlignment="Stretch" >
<StackPanel Margin="0,0,0,0" Width="Auto" >
<Rectangle Fill="Aqua" Height="200"/>
<Rectangle Fill="Red" Height="200"/>
<Rectangle Fill="Yellow" Height="200"/>
<Rectangle Fill="Blue" Height="200"/>
<Rectangle Fill="Green" Height="200"/>
</StackPanel>
</ScrollViewer>
</Grid>