If they worked just fine in your EOS 5D Mark II, you won't likely brick anything using them in your EOS 5D Mark IV.
From a Canon Digital Learning Center article titled: How to protect yourself against counterfeit Canon batteries:
It’s important to understand that these warnings will still allow the user to proceed, after confirming via simple menu commands on the camera whether the battery has a Canon logo and, if so, whether the user accepts any potential risk in using a battery that the camera cannot confirm is a genuine Canon-brand battery. If you have purchased a non-Canon branded third party battery, you may get this warning screen upon every start up — but you’re free to use the battery, after telling the camera that you accept any possible risks.
The older batteries should still provide power to the camera, you just won't get the full functionality you got when using them with the 5D Mark II. This would include ID and registration, advanced power information such as last date inserted, recharge performance, number of shots since last charge, etc. You may or may not get even the basic battery power level symbol on the top LCD screen of your 5D Mark IV. I've read one anecdotal account that said the battery symbol did not appear immediately after power up, but later did show during the same shooting session (without any power cycling of the camera).
The exact sequence and the results of each answer to the challenge question, as outlined in the same Canon article, goes like this:
Here’s what you’ll see on the newest cameras:
Actual Canon-brand battery:
No warning screen appears. Camera starts up normally and is ready to use.
Camera cannot confirm full communication with battery:
Warning screen appears. Here’s the sequence:
1) Within 5 seconds: “Battery Communication Error. Does this battery display the Canon logo?”
NO “Canon does not guarantee the performance or safety of this battery. Continue use?”
If you select YES and press the SET button, the camera turns on normally.
You’ve told the system this is a non-Canon branded battery and you accept any possible risk of a performance or safety issue.
If you select NO, you’ve told the camera not to continue use with this battery and the camera will shut off. You can restart it by turning the camera’s main switch back to ON or pressing the On-Off button again, if you change your mind.
YES “Battery may be counterfeit! Please call customer support. Shutting off for your safety.”
A battery with a Canon logo (not a third party accessory, as discussed above) is one of two things:
(1) a genuine Canon battery which cannot communicate with the camera possibly due to a defect or dirty battery contact or
(2) a counterfeit Canon-branded battery, made to look like a genuine
Canon battery but without the internal communication circuitry needed
to complete the start up process with the select Canon camera(s).
“OK” is your only option in this case; the camera will shut off to prevent potential damage to you and your property. You can turn it back on by repeating the start procedure.
This new protective sequence will happen each time you turn the camera on (recent Canon EOS, PowerShot, and VIXIA products), if full battery-to-camera communication cannot be confirmed upon start up.
What Canon seems to be doing with this challenge question that requires a user answer that acknowledges "Canon cannot guarantee the the performance or safety of this battery..." is to shift liability from Canon to the user if anything should go wrong. Although not spelled out anywhere that I can find, it would probably be safe to assume that the camera is storing the user's response to proceed with a third party battery. If there are issues with the camera later that might be attributable to a faulty power supply Canon will likely attempt to decline warranty coverage. Laws vary widely from one locality to the next so the full implications of the user acknowledgement can not be covered in an answer of this scope here. The legal ramifications regarding warranty coverage should be similar in each locale to the older cameras such as the 7D Mark II and 5D Mark II that have a one step sequence: "Communication with Canon LP-E6 battery is irregular. Continue to use this battery?" The user chooses either Cancel, in which case the camera shuts down, or OK, in which case the camera continues the power on sequence.
I have read scattered anecdotal reports that the 5D Mark IV will refuse to power up with some, but not all, older third party batteries. It is unclear from those reports if the user answered Yes or No to the challenge question. I've also read reports that new copies of the LP-E6N from companies such as Watson, Wasabi, and SterlingTek work just fine in the 5D Mark IV without even being challenged with any dialog upon turning the camera on. Sometimes one firmware version may accept the same battery without the challenge question that another firmware revision will not.
If you are that worried about damaging your new camera, then use the older 3rd party batteries only in your older camera. If you've sold it, then offer the buyer a good deal on them. You can buy fresh 3rd party LP-E6N batteries that have been confirmed to work with the 5D Mark IV for as little as $15 each. That's not much to pay for peace of mind regarding a $3,500 camera.
Canon periodically updates the battery protocol, apparently just to discourage use of third party batteries. Canon older batteries are not (supposed to be^) affected because the firmware in the older batteries already contain some "secret" lines of code that are only needed with the updated protocols. When the newer camera detects a battery without the hidden code it will give you the message to try and scare you into only buying Canon batteries. (^When Canon updated the LP-E6 battery to the LP-E6N and revised the LC-E6E charger they had an issue with many older OEM LP-E6 batteries not charging properly in the new charger.)
Since the third party battery manufacturers reverse engineer their batteries, they didn't include the "hidden code" in older copies of their LP-E6 replacements that were reverse engineered from the older Canon batteries upon which they were based because the older cameras do not interact with the "hidden" lines of code.
It's all a cat and mouse game. It usually only takes a few weeks for the top third party battery makers to crack the new protocol and include it in their copies. I use MaximalPower (Amazon is the only authorized seller) and Sterling Tek third party batteries. My older ones function fully in the 5DII and 7D, but have the limited functionality in the 5DIII and 7DII. My newer third party batteries from MaximalPower and Sterling Tek also fully function in the 5DIII and 7DII. The third party batteries seem to also handle more charge/discharge cycles before their performance noticeably degrades. That may be one reason why Canon plays such games: their own batteries aren't as good as the best third party batteries. There are a lot of crappy third party batteries too, though.
Another thing to consider is that the genuine Canon batteries are more likely to be counterfeited and passed off as genuine by shady sellers. Fake third party batteries aren't near as common. After all, if you're going to make a cheap fake, why not mimic the version that sells for $60 instead of the version that sells for $20 or $10 or $5? If you buy a 'genuine" battery from an unauthorized seller it is highly likely you have bought a fake. If you buy "genuine" or third party batteries from authorized, reputable sources you are much more likely to get what you think you are paying for.
For more about using third party batteries, please see:
Why do cameras use proprietary batteries?
Should the INFO display show the status of both batteries in a Canon battery grip?
Should I buy an original manufacturer battery, or is a generic brand OK?