I saw some people use a technique where they block with their sword AND punch the player at the same time. Also, those players also end up punching the player WHILE eating the golden apple, creating this weird animation where you punch and eat on the run, like what you see in Wifies's videos. Can this be possible in 1.17?
It is not possible to eat a golden apple while punching a player. Furthermore, it is not possible to block your sword in Java Edition 1.17 because of the shield mechanic.
The animation that you see is most likely a mod for the game that makes it look like the player is punching a block while eating or blocking their sword, but this game mechanic has not been in the game since Minecraft version 1.7.
Some players have created Minecraft Forge mods for version 1.8 which show this animation but most of them do not implement the mechanic. If you want to download these mods, you can find them by searching "1.7 animations mod", however these only work for version 1.8 because of shields being added in 1.9, disabling the sword blocking mechanic.