A cron job specified as
0 */5 * * * script.sh
would run as your second option, with four hours between the job at 20:00 and 00:00.
You could try using five job specifications:
0 0-20/5 1-31/5 * * script.sh
0 1-21/5 2-31/5 * * script.sh
0 2-22/5 3-31/5 * * script.sh
0 3-23/5 4-31/5 * * script.sh
0 4-19/5 5-31/5 * * script.sh
The 3rd field is the day of the month. This would run your job perfectly every five hours on months that have a multiple of five days. On other months, you would have the same issue with a too short delay between the last job run of the month and the first run in the new month.
This may be okay. If it's not, you may want to consider running the job as a background job in an infinite loop with a 5 hour delay built-in.
while true; do
sleep 18000 # 5h
The above would be a controlling script that would run in the background.
This would obviously start drifting ever so slightly after a large number of iterations, and you may have difficulties starting it exactly on the hour.
Another idea is to let the script itself reschedule itself using
echo script.sh | at now + 5 hours
# rest of script goes here.