Mac software that automatically switches between applications every several seconds or so?
You could create an AppleScript using the AppleScript Editor in /Applications/Utilites. The syntax is quite easy to follow, and I'd base it on something like this:

repeat
  tell application "Safari" to activate
  delay 10
  tell application "Finder" to activate
  delay 10
end repeat


This will repeatedly have Safari and Finder get focus while waiting 10s in between. Having 10 seconds as an delay should give you enough time to re-open the editor and click on "stop". Another option would be to use repeat while instead and to create a stop criterium, like if exists "/path/to/makeitstop" as POSIX file which would make it stop after a file makeitstop is created.