When did they do good or bad?
Within the minute after they heard Jesus' voice?
No, but in their life prior to their burial.
Christ did say "do not marvel" the Father has committed all authority to kill and make alive, and He will do that based upon whether people "listen" to His voice or not:
21 "For
as the Father raises the dead and gives life to them, even so the Son gives life to whom He will.
22 "For the Father judges no one, but has committed all judgment to the Son,
23 "that all should honor the Son just as they honor the Father. He who does not honor the Son does not honor the Father who sent Him.
24 "Most assuredly, I say to you,
he who hears My word and believes in Him who sent Me has everlasting life, and shall not come into judgment, but has passed from death into life.
25 "Most assuredly, I say to you, the hour is coming, and now is, when the dead will hear the voice of the Son of God; and those who hear will live.
26 "For as the Father has life in Himself, so He has granted the Son to have life in Himself,
27 "and has given Him authority to execute judgment also, because He is the Son of Man.
28
"Do not marvel at this; for the hour is coming in which all who are in the graves will hear His voice
29 "and come forth-- those who have done good, to the resurrection of life, and those who have done evil, to the resurrection of condemnation. (Jn. 5:21-29 NKJ)
When the Pharisees objected that Christ's teaching implied He was equal with God, HE DID NOT DENY IT.
16 For this reason the Jews persecuted Jesus, and sought to kill Him, because He had done these things on the Sabbath.
17 But Jesus answered them, "My Father has been working until now, and I have been working."
18 Therefore the Jews sought all the more to kill Him, because He not only broke the Sabbath, but also said that God was His Father, making Himself equal with God. (Jn. 5:16-18 NKJ)
HE PROVED IT, saying His voice "kills and makes alive all who obey it just like the Father", whatever He sees the Father do, He can do in the Father:
19 Then Jesus answered and said to them, "Most assuredly, I say to you, the Son can do nothing of Himself, but what He sees the Father do; for whatever He does, the Son also does in like manner.
20 "For the Father loves the Son, and shows Him all things that He Himself does; and He will show Him greater works than these, that you may marvel.
21
"For as the Father raises the dead and gives life to them, even so the Son gives life to whom He will.
22 "For the Father judges no one, but has committed all judgment to the Son,
23 "that all should honor the Son just as they honor the Father. He who does not honor the Son does not honor the Father who sent Him. (Jn. 5:19-23 NKJ)
That is the context. The Pharisees objected Christ made Himself equal to God, and Jesus saying "that's right, I am."
Its not about the wicked being punished for sins, its about God killing and making alive whoever He wants to. He will have mercy on whomever He chooses to have mercy, and Here Jesus says all the dead "who hear will live"
25 "Most assuredly, I say to you,
the hour is coming, and now is, when the dead will hear the voice of the Son of God; and those who hear will live.
26 "For as the Father has life in Himself, so He has granted the Son to have life in Himself, (Jn. 5:25-26 NKJ)