Could you implement the spoiler-function (via Details/Summary) in Visual-Editor?
If you set it HTML-Mode and convert the page to Editor it gets removed.