The hard drive mechanism is the same and "swappable" between 5th gen and later iPods (4th gen and earlier use a different type), except for the physical thickness of the drive. Some iPod's use the thicker (two-platter) drive and some use the thinner (one-platter) drive. Since this iPod is "thin," it uses the thinner drive, so I assume you got a replacement drive that is thin. And you both use Macs, so formatting of the hard drive is not a consideration, and iPod storage has been formatted the same way since the original iPod.
If you took the replacement out of a "dead" iPod, it's always possible that the hard drive was "on it's last legs." It may have become faulty, from the stress of being used again, if it sat not being used for a while (and it was already "well-used"). If you need to replace it again, instead of finding another used 1.8-inch hard drive of unknown reliability, you may want to consider using a commonly available (and affordable) Compact Flash card or SD card, on an adapter. This web site has relevant info
https://www.iflash.xyz
I have not used these particular adapters for 5th gen and later iPods, but I have performed equivalent mods (with Compact Flash and SD card) on my older 4th gen iPod, 3rd gen iPod, and iPod mini (using different adapters). They work quite well, and with much higher storage capacity, and other advantages of replacing hard drives with "solid state" storage.
the apple tech support executive in my country said the older iTunes will not recognize the iPod anymore.
That's nonsense. The currently sold 7th gen iPod nano requires iTunes 12 (does not work with iTunes 11), but that's because it's a brand new iPod and it requires the current iTunes, by design. The last iPod classic design is from 2009. Here's the official tech specs page for the last iPod classic model
iPod classic 160GB (Late 2009) - Technical Specifications
It says for Mac System Requirements
- Mac OS X v10.4.11 or later
- iTunes 9 or later