sed is a stream editor - it only deals with "records"; you get the data up to
but not including the newline (\n).
Also the "g" modifier only applies to the current record.
It is possible to read several records in then run the substitution. The following code searches for the "*" then reads the next 2 lines, then replaces the lot with dashes similar to what you did.
Code:
sed '/*/ {N;N;s/.*/----------------/}' example